Commit graph

1757 commits

Author SHA1 Message Date
Steve Beattie
4ff5b80ee8 From: Jeff Mahoney <jeffm@suse.com>
Fix compilation in deprecated gnome apparmor applet.
2011-02-08 12:52:26 -08:00
Steve Beattie
fb8d5d05dc From: Jeff Mahoney <jeffm@suse.com>
utils/Makefile: abstract out the perl vendor location for distros to
override if necessary
2011-02-08 10:39:44 -08:00
Steve Beattie
cef7289d75 From: Jeff Mahoney <jeffm@suse.com>
Fix grammar in in utils UI text.
2011-02-08 10:25:05 -08:00
Steve Beattie
94dfe15b28 From: Jeff Mahoney <jeffm@suse.com>
libapparmor: remove LD_RUN_PATH from swig generated makefile as it
results in an rpath binding in the library.
2011-02-08 09:27:32 -08:00
Steve Beattie
788bdcafb9 From: Jeff Mahoney <jeffm@suse.com>
Fix up tomcat build, also use in-tree libapparmor.
2011-02-08 08:22:46 -08:00
Steve Beattie
0cfa2b2cf8 From: Jeff Mahoney <jeffm@suse.com>
Rip out a little bit of crufty old compatibility code with immunix.h and
support directly building with in-tree libapparmor.
2011-02-08 08:18:36 -08:00
Steve Beattie
37ac8ede4f From: Jeff Mahoney <jeffm@suse.com>
Subject: adjust includes for pam_apparmor to point at the intree version
of libapparmor, rather than depend on an external version to be
installed.
2011-02-08 07:21:20 -08:00
Steve Beattie
09edd269aa Makefile: make setup target work independently 2011-02-08 07:05:39 -08:00
Jamie Strandboge
61e7aac455 make aa-disable executable 2011-02-07 21:02:57 -06:00
Jamie Strandboge
bf02536fa3 Description: add aa-disable
aa-enforce and aa-complain exist to put a profile into enforce or
 complain mode respectively. The /etc/apparmor.d/disable directory
 already exists to drop files into it to disable profile load via
 apparmor_parser (and therefore via the apparmor initscript). What
 doesn't exist is aa-disable to add a file to the disable/ directory and
 unload the profile. This patch does that. This version of aa-disable is
 based on aa-complain (in fact doing a diff between aa-complain and
 aa-disable might make review easier) and works as well as aa-enforce and
 aa-complain. In other words, aa-disable has the same limitations of not
 handling the specified binary properly if the specified attachment does
 not match the path naming scheme (eg, the profile doesn't use the
 conventional path.to.binary naming scheme, globbing is used for
 attachment within the profile, etc). Also adjust documentation to
 reference aa-disable.
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-02-07 20:48:50 -06:00
Jamie Strandboge
74b2fdc52c update documentation for aa-disable 2011-02-07 17:39:54 -06:00
Jamie Strandboge
1459c9eb20 add aa-disable 2011-02-07 17:39:36 -06:00
Steve Beattie
1005bfdf7e Subject: logprof - variable definitions should not have trailing commas.
This patch fixes a logprof bug where when profiles with variable
declarations at the top level (not hidden in an include) were written
back to a file, a trailing comma was being added to the declaration
statement, which is invalid apparmor policy syntax. This patch corrects
this and no longer adds the trailing comma.
2011-02-04 21:20:58 -08:00
John Johansen
52453313c1 Update to latest version of apparmor.vim from Chritian Boltz 2011-01-26 06:43:39 -08:00
Steve Beattie
6f620e9247 From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor: Fix network event parsing
References: bnc#665483

 The upstream version of AppArmor had network mediation but it was
 removed. There's a compability patch floating around that both openSUSE
 and Ubuntu have applied to their kernels. Unfortunately, one part was
 overlooked. The socket operation event names where changed from the
 socket_ prefixed names they had when AppArmor was out-of-tree and
 utils/SubDomain.pm was never updated to understand them.

 This patch adds an operation-type table so that the code can just
 do a optype($operation) call to discover what type of operation a
 particular name refers to. It then uses this in place of the socket_
 checks to decide whether an event is a network operation.

 This allows genprof and logprof to work with networking rules again.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Bug: https://launchpad.net/bugs/706733
2011-01-24 15:49:46 -08:00
Steve Beattie
1c2591de1e This patch removes all of the old log parsing code from libapparmor.
The testcases that were in place for the old style log messages have
had their expected output modified such that they are expected to
return invalid results, rather than deleting the testcases outright.
2011-01-21 11:47:54 -08:00
Steve Beattie
93ae7808cb From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-parser: Fix up translations
References: bnc#586070

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-01-14 17:44:51 -06:00
Kees Cook
14d8bac7b2 Here's an update to rename another chunk of things that still used
"SubDomain" in some way. This leaves only "subdomain.conf" and the
function names internally.

Additionally, I added a "make check" rule to the utils/Makefile to do a
simple "perl -c" sanity check just for good measure.
2011-01-13 13:58:26 -08:00
Kees Cook
dd3a964249 drop /var/log/apparmor, stop installing Reports.pm, use LOGPROF_DEBUG as the debugging target instead of /var/log/apparmor 2011-01-13 09:13:34 -08:00
Steve Beattie
d088727bdf Support newer auditd formatted messages. Patch from mancha on irc.
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-01-12 13:57:19 -06:00
Jamie Strandboge
0807a74490 The example firefox profile in extras has been pretty out of date. Also, it
allows write to the ~/Desktop directory, which could conceivably allow writing
of .desktop files which could be clicked on and executed by the user. This is
based on the firefox base profile as included in Ubuntu. Notable features:
- allows for using the browser to navigate through directories
- allows reads from @{HOME}/Public/**
- allows writes to @{HOME}/Downloads/**

The intent of this profile is to restrict code execution, writes to $HOME
and information leaks while allowing basic web browsing and reading of
system documentation. It does not allow for plugins, extensions or other
helpers (but these can be added via the local/ mechanism).
2011-01-12 11:51:22 -06:00
Jamie Strandboge
b12d93a739 Attached is an updated dnsmasq profile that fixes the following:
- allow net_admin capability for DHCP server
- allow net_raw and network inet raw for ICMP pings when used as a DHCP
server
- allow read and write access to libvirt pid files for dnsmasq

See the FAQ in the dnsmasq source for details. This fixes
https://launchpad.net/bugs/697239
2011-01-12 11:47:04 -06:00
John Johansen
2796c58eca Refresh kernel compatibility patches for 2.6.36.2 and 2.6.37 2011-01-09 21:03:19 -08:00
Jamie Strandboge
22f912b9f1 abstractions/private-files: don't allow wl to autostart directories
abstractions/private-files-strict: don't allow access to:
  - chromium
  - thunderbird
  - evolution
  - kmail
  - kwallet
2011-01-07 21:05:59 -06:00
Steve Beattie
0e87acb318 Change the compilation ordering in the regression testsuite as the
toolchain has gotten stricter about linking order; in short, linked
libraries need to come after the objects referring to them. Adding to
LDLIBS is the correct solution for this.

See https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition for more
details.
2011-01-07 10:35:47 -08:00
Jamie Strandboge
f7c6a848bb abstractions/private-files: don't allow wl to autostart directories
abstractions/private-files-strict: don't allow access to:
- chromium
- thunderbird
- evolution
- kmail
- kwallet
2011-01-07 10:44:47 -06:00
Steve Beattie
cb96345f21 From: Jeff Mahoney <jeffm@suse.com>
dynamically link in libapparmor library in libapparmor's testsuite.
2011-01-05 14:41:11 -08:00
Jamie Strandboge
d03c2e681f abstractions/freedesktop.org updates:
- require owner match for files in @{HOME}
- add new path for @{HOME}/.local/share/recently-used.xbel*
- add the following, confirmed via specifications:
  /usr/share/applications/mimeinfo.cache r,
  /usr/share/applications/*.desktop r,
  owner @{HOME}/.local/share/applications/defaults.list r,
  owner @{HOME}/.local/share/applications/mimeinfo.cache r,
  owner @{HOME}/.local/share/applications/mimeapps.list r,
  owner @{HOME}/.local/share/applications/*.desktop r,

References:
http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-0.9.4.html
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec
2010-12-23 18:39:28 -06:00
Jamie Strandboge
73c1283e98 abstractions/X: allow access to /usr/lib32 and /usr/lib64 for dri modules
(LP: #658135)
2010-12-23 18:39:02 -06:00
Jamie Strandboge
e400b296d8 abstractions/freedesktop.org updates:
- require owner match for files in @{HOME}
- add new path for @{HOME}/.local/share/recently-used.xbel*
- add the following, confirmed via specifications:
  /usr/share/applications/mimeinfo.cache r,
  /usr/share/applications/*.desktop r,
  owner @{HOME}/.local/share/applications/defaults.list r,
  owner @{HOME}/.local/share/applications/mimeinfo.cache r,
  owner @{HOME}/.local/share/applications/mimeapps.list r,
  owner @{HOME}/.local/share/applications/*.desktop r,

References:
http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-0.9.4.html
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec
2010-12-23 07:52:47 -06:00
Jamie Strandboge
8180aa0bd3 abstractions/base: allow access to /usr/lib32 and /usr/lib64 for dri modules
(LP: #658135)
2010-12-23 07:46:55 -06:00
Jamie Strandboge
e356c4b19e add enchant abstraction. Enchant is a frontend for spellcheckers and in
use by more and more applications, including empathy and evolution. It
is listed on freedesktop.org. See:
http://www.abisource.com/projects/enchant/

This abstraction gives access to enchant itself, files in the user's home
directory for enchant and various dictionaries for:
- aspell
- ispell
- hunspell
- myspell
- hspell
- zemberek
- voikko
2010-12-22 16:59:44 -06:00
Jamie Strandboge
5c040c6149 allow 'rw' to /var/log/samba/cores/ (LP: #652562) 2010-12-22 16:58:23 -06:00
Jamie Strandboge
d097df8226 add preliminary ibus abstraction. Will likely need more once more ibus users
start to use it. Additionally, the 'rw' on the @{HOME}/.config/ibus/bus/
probably only needs 'create' and 'chmod', so that could be tightened up once
those are exposed in the tools. LP: #649497.
2010-12-22 16:57:35 -06:00
Jamie Strandboge
add5d47fc3 abstractions/user-manpages: require owner match for files in @{HOME} and /tmp 2010-12-22 16:55:50 -06:00
Jamie Strandboge
2227de709b abstractions/user-mail:
- use character globbing
- require owner match for files in @{HOME}
2010-12-22 16:55:18 -06:00
Jamie Strandboge
84b5f6e441 abstractions/user-write:
- require owner match
- add @{HOME}/Public/
2010-12-22 16:54:40 -06:00
Jamie Strandboge
1f2b4a5a19 abstractions/user-download:
- fix typo for Desktop (should be Desktop/)
- require owner match
- allow writes to @{HOME}/[dD]ownload{,s}
2010-12-22 16:52:13 -06:00
Jamie Strandboge
1b78752db6 utils/Config.pm: disable the repository by explicitly setting
$config->{repository}{enabled} = "no" (LP: #692406). We need to do this
since opensuse's site is down and there is no current alternative. Can
reenable once we have an alternative.
2010-12-21 22:08:28 -06:00
Jamie Strandboge
ca30e18692 utils/Config.pm: disable the repository by explicitly setting
$config->{repository}{enabled} = "no" (LP: #692406). We need to do this
since opensuse's site is down and there is no current alternative. Can
reenable once we have an alternative.
2010-12-21 16:56:21 -06:00
Jamie Strandboge
36f6da62aa update ubuntu abstractions to use '# vim:syntax=apparmor' 2010-12-21 12:54:57 -06:00
Jamie Strandboge
046cfe305f update ubuntu abstractions to use '# vim:syntax=apparmor' 2010-12-21 12:53:33 -06:00
Jamie Strandboge
5272c9ef0a utils/apparmor.vim: update comments on how to use 2010-12-21 10:55:24 -06:00
Jamie Strandboge
aa7304f01e utils/apparmor.vim: remove trailing whitespace 2010-12-21 10:45:33 -06:00
Kees Cook
acfcdfe750 ignore generated manpages 2010-12-20 14:02:03 -08:00
Kees Cook
39b5240966 mark parser/tst/simple_tests/xtrans/minimize-x-conflict.sd as "TODO" and hook up parser/tst/Makefile "clean" to parser/Makefile "clean" rule 2010-12-20 13:44:14 -08:00
Kees Cook
b11fd82d96 make gen-xtrans executable 2010-12-20 13:25:54 -08:00
John Johansen
3973387295 Add missing files from my last 11 patches as I forgot to do bzr add before
committing.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 13:18:36 -08:00
Kees Cook
a6dc414f57 adjust line offset now that $Id$ was removed 2010-12-20 13:06:54 -08:00
Kees Cook
723a20ba7d as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00