Commit graph

1876 commits

Author SHA1 Message Date
Seth Arnold
cad0c3c8a9 Include mknod in file operations aa-logprof / aa-genprof processing 2011-11-08 19:06:49 -08:00
Christian Boltz
49103b30f2 Make abstractions/winbind work on 64bit systems (valid.dat etc. are in
/usr/lib64/samba/ in openSUSE 64bit installations)

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-11-01 18:35:29 +01:00
Christian Boltz
df47a59ecb Allow loading the libraries used for Samba "vfs objects = ..."
References: https://bugzilla.novell.com/show_bug.cgi?id=725967

Signed-off-by: Christian Boltz <apparmor@cboltz.de>

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-11-01 18:28:49 +01:00
Christian Boltz
091ec763f9 split off abstractions/ldapclient from abstractions/nameservice
Original openSUSE changelog entry:

Thu Jan  6 16:23:19 UTC 2011 - rhafer@suse.de

- Splitted ldap related things from nameservice into separate
  profile and added some missing paths (bnc#662761)
2011-11-01 17:08:37 +01:00
Christian Boltz
33b7c5316f create the directory /etc/apparmor.d/disable which is required by aa-disable
Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-20 00:23:19 +02:00
Christian Boltz
986093cf8d More helpful error message for "aa-notify -p" if a user is not member of
the group configured in notify.conf / use_group=...

Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-20 00:20:02 +02:00
John Johansen
33c62acc5c Update version to 2.7~rc1 2011-10-12 16:45:45 -07:00
Christian Boltz
8b671f013a add the option --display to set the $DISPLAY environment variable in aa-notify.
If $DISPLAY is not set and --display is not used, aa-notify prints a 
warning that notifications won't be shown (exact warning text depends if 
using sudo or not).

Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-12 13:08:25 +02:00
Christian Boltz
5789ab84a6 allow read access for /proc/*/mounts in the dovecot profile
Reported by Tim Edwards in the opensuse-factory	mailinglist.


Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-12 13:05:00 +02:00
Christian Boltz
6d6e04dc12 fix a syntax error in remove_profiles() in rc.apparmor.functions by
adding a forgotten pipe.

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-10-12 00:45:11 +02:00
John Johansen
7a7c99f3a1 Commit the example parser.conf file that was supposed to be part of
commit r1834

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-10-09 20:15:03 -07:00
John Johansen
9896f5edbd Add an example parser.conf file
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-10-07 14:43:54 -07:00
John Johansen
12a98135bf Provide a more user friendly error message when cache is
requested and fails to be created.  Also don't make the
warning output conditional on the showcache flag as we
should be showing warning/errors by default.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-10-07 14:42:55 -07:00
Jamie Strandboge
a30dfb6b19 utils/aa-notify:
- set HOME (and DISPLAY) only once on startup to avoid NSS lookups

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <opensuse@cboltz.de>
2011-09-30 18:00:52 -05:00
Christian Boltz
a4d4eddd92 while aa-eventd is deprecated and no longer installed, parser/Makefile
happily continued to install the initscript for aa-eventd.

This was reported by Jiri Srain as part of 
https://bugzilla.novell.com/show_bug.cgi?id=720617

This commit removes the lines that install the aaeventd initscript
from parser/Makefile.

Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-01 00:23:39 +02:00
Christian Boltz
b393893c7a sudo resets the environment variable $HOME and removes $DISPLAY on
openSUSE, which results in non-working desktop notifications in aa-notify
because $notify_exe is unable to connect to DBUS to display the message.

This patch sets the correct value for $HOME.

The code for setting $DISPLAY is still under discussion, therefore only
a TODO note is included in this commit for $DISPLAY.

Acked-By: John Johansen <john.johansen@canonical.com>
2011-09-24 13:19:10 +02:00
John Johansen
572fb7e943 AppArmor_2.7-beta2
Signed-off-by: John Johansen@canonical.com
2011-09-15 13:55:48 -07:00
John Johansen
7173d7a6a5 Remove extra space insert at from of ${TAG_VERSION} when doing the ~ to -
substitution.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-09-15 13:28:01 -07:00
John Johansen
7b577d72b5 Remove ~ based tags again
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-09-15 12:50:10 -07:00
Christian Boltz
5a140c2e5c while debugging the issue in rc.apparmor.suse (see patch for
rc.apparmor.suse), I noticed that "rcapparmor restart" is
totally silent.

The attached patch prints a message in __apparmor_restart().

It also replaces the hardcoded "return 0" with $?. I'm quite sure this
won't catch all errors, but it's still better than the hardcoded success
message.

Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-15 21:23:25 +02:00
Christian Boltz
e922cdb113 sbin.syslog-ng profile:
- fix permissions for additional-log-sockets.conf (the comma in {var/,} 
  was at the wrong place, which broke the /var/run/ case)
- add read permissions for /sys/devices/system/cpu/online
  (that was even new for Peter, but I trust him not to post faked 
  audit.log lines ;-)

Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-15 21:21:57 +02:00
Christian Boltz
189da8236c the last patch to the usr.sbin.dnsmasq profile (r1758) contained a wrong
filename.

References: https://bugzilla.novell.com/show_bug.cgi?id=678749#c11

Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-15 20:58:54 +02:00
Christian Boltz
2c62d802b6 It looks like rc.apparmor.functions renamed "aa_log_action_begin()" to
"aa_log_action_start()" (probably for 2.6), but the rc.apparmor.suse 
initscript was not updated.

This patch fixes the function name in the rc.apparmor.suse initscript.

References: https://bugzilla.novell.com/show_bug.cgi?id=717707

Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-15 20:20:23 +02:00
Christian Boltz
23df761b70 Make the VENDOR_PERL directoy autodetected in utils/Makefile instead of
hardcoding it.

Acked-by: Kees Cook <kees@ubuntu.com>
2011-09-15 20:17:58 +02:00
Christian Boltz
6a80641ee2 perl modules don't need execute permissions.
This patch installs the perl modules with mode 644 instead of 755.

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-09-13 20:58:24 +02:00
Christian Boltz
02e1e94ab9 add a missing "make install" call to README in the libapparmor section.
Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-12 22:30:17 +02:00
Jamie Strandboge
f28b91b8cf add gwenview to abstractions/ubuntu-browsers.d/multimedia. This is the
default image viewer in Kubuntu (LP: #840973)
2011-09-07 15:00:45 -05:00
Jamie Strandboge
6849615de6 adjust ubuntu-email abstraction for thunderbird rapid release process 2011-09-02 13:21:06 -05:00
John Johansen
743f84099d Allow passing of DEBUG from make into the compile
Fix the build so
    
  make DEBUG=1
    
results in a compile with DEBUG turned on.
    
Also fix build errors in the compile with DEBUG is defined
    
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-09-01 11:57:54 -07:00
John Johansen
a041b1738c Remove apparmor_2.6.0~rc1 and apparmor_2.6.0~rc1 tags so git can sync
yet again!

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-31 16:15:44 -07:00
John Johansen
1056ef8418 Add missing documentation updates for aa_is_confined and aa_get_con.
This documentation should have been checked in as part of the patches
that added aa_is_confined and aa_get_con.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-31 16:07:55 -07:00
John Johansen
ac77e10a0f Fix missing pid_t dependency in apparmor.h
The define for pid_t is missing in apparmor.h so that if it is included
in programs that don't also include sys/types.h the compile will break.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-08-31 16:01:54 -07:00
John Johansen
eae6f0525c Add missing introspection regression test that should have been checked in
with the introspection patches.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-31 15:58:27 -07:00
John Johansen
341b7e61da Add compatibility patches for linux kernel 3.1 2011-08-27 12:56:53 -07:00
John Johansen
eb6d2224bd Updated kernel compatibilty patches for linux 3.0 2011-08-27 12:25:22 -07:00
Christian Boltz
bb1b5f986b Add permissions needed for Active Directory authentification to Samba
profiles.

References: https://bugzilla.novell.com/show_bug.cgi?id=713728

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-27 20:50:42 +02:00
Steve Beattie
1c1cc65cbd Update useradd and userdel profiles to use wutmp abstraction. 2011-08-26 18:58:31 -07:00
Steve Beattie
5dedd16bf5 Cleanup no longer necessary wutmp permission now that it's covered by
the wutmp abstraction.
2011-08-26 18:51:03 -07:00
Christian Boltz
66d51b575d From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-profiles: Add samba config files
References: bnc#679182 bnc#666450

Signed-off-by: Jeff Mahoney <jeffm@suse.com>

- updated to match trunk
- added changed path to nmbd profile (/var/cache/samba has moved to 
  /var/lib/samba on (at least) openSUSE 11.4), bnc#679182#c8
  For backward compability, it also allows /var/spool/samba.
- Note: The smbd profile already contains both locations.
by Christian Boltz <apparmor@cboltz.de>

updated according to the comments from Steve Beattie
by Christian Boltz <apparmor@cboltz.de>

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-27 01:52:27 +02:00
Christian Boltz
f26df713c0 Dovecot profile update:
- allow /var/spool/mail, not only the /var/mail symlink
- allow @{HOME}/Mail/
- allow capability fsetid, read access to /etc/lsb-release and 
  SuSE-release and k for /var/{lib,run}/dovecot in usr.bin.dovecot

References:
- dovecot: Added support for /var/spool/mail (bnc#691072)
- Updated dovecot profile (bnc#681267).

Patch taken from openSUSE:11.4:Update:Test, file apparmor-profiles-dovecot
updated to match trunk by Christian Boltz <apparmor@cboltz.de>

Change compared to the patch posted to the ML:
- link rule instead of adding l permissions for /var/lib/dovecot and 
  /var/run/dovecot (as proposed by John Johansen)

Acked-By: John Johansen <john.johansen@canonical.com> on IRC
2011-08-27 01:12:10 +02:00
Steve Beattie
b8f486dee9 Attached is a patch to make the initscript not fail if /tmp is full
by converting the comm(1) usage on temporary files to an embedded
awk script. On both Ubuntu and OpenSUSE, a version of awk (mawk in
Ubuntu, gawk in OpenSUSE) is either a direct or indirect dependency
on the minimal or base package set, and the original reporter also
mentioned that an awk-based solution would be palatable in a way that
converting to bash, or using perl or python here would not be.

In the embedded awk script, I've tried to avoid gawk or mawk specific
behaviors or extensions; e.g. this is the reason for the call to sort
on the output of the awk script, rather than using gawk's asort(). But
please let me know if you see anything that shouldn't be portable
across awk implementations.

An additional issue that is fixed in both scripts is handling child
profiles (e.g. hats) during reload. If child profiles are filtered
out (via grep -v '//') of the list to consider, then on reloading
a profile where a child profile has been removed or renamed, that
child profile will continue to stick around. However, if the profile
containing child profiles is removed entirely, if the initscript
attempts to unload the child profiles after the parent is removed,
this will fail because they were unloaded when the parent was unloaded.
Thus I removed any filtering of child profiles out, but do a post-awk
reverse sort which guarantees that any child profiles will be removed
before their parent is. I also added the LC_COLLATE=C (based on the
Ubuntu version) to the sort call to ensure a consistent sort order.

To restate, the problem with the existing code is that it creates
temporary files in $TMPDIR (by default /tmp) and if that partition
is full, problems with the reload action ensue. Alternate solutions
include switching the initscript to use bash and its <$() extension
or setting TMPDIR to /dev/shm/. The former is unpalatable to some
(particularly for an initscript), and for the latter, /dev/shm is
only guaranteed to exist on GNU libc based systems (glibc apparently
expects /dev/shm to exist for its POSIX shared memory implementation;
see shm_overview(7)).  So to me, awk (sans GNU extensions) looks to
be the least bad option here.

Bug: https://launchpad.net/bugs/775785
2011-08-26 15:55:43 -07:00
Christian Boltz
ac7e66684c Add various capabilities to smbd that are needed for the way powerpoint
handles files. See bnc#705319 for details.

References: https://bugzilla.novell.com/show_bug.cgi?id=705319

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-26 23:19:30 +02:00
Steve Beattie
be3d2bc1a4 Update traceroute profile to include installed path on Ubuntu/Debian. 2011-08-25 15:36:30 -07:00
Christian Boltz
8f28eebe5a Add capability setuid and setgid to nscd profile. Needed by unscd
to switch to a non-root user. unscd is installed as /usr/sbin/nscd
at least at openSUSE.

Original changelog entry from unscd package:
Mon Sep  7 17:30:36 CEST 2009 - pbaudis[at]suse.cz
- Provide the /etc/apparmor.d/usr.sbin.nscd file and make it allow
  for change to the nobody user [bnc#535467]

Currently the nscd package from glibc and the unscd package both contain
a usr.sbin.nscd profile which needs to maintained/updated manually.
With this patch, the profile could be moved back to the
apparmor-profiles package.


Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-24 00:57:42 +02:00
Christian Boltz
d17a87bd28 bnc#685674 - The "-I" flag of traceroute is blocked by apparmor
* Do Apr 07 2011 jeffm@suse.de
- Add raw network access to traceroute profile (bnc#685674).

Acked-By: Steve Beattie <steve@nxnw.org>
2011-08-23 02:10:14 +02:00
Christian Boltz
59eb0af705 nscd: allow mkdir for /var/run/nscd/
References: https://bugzilla.novell.com/show_bug.cgi?id=647718

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-23 01:22:41 +02:00
Christian Boltz
7d5840d449 apparmor.vim:
- allow "deny [filename] x" rules
- add support for "make clean"

Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-21 23:49:25 +02:00
John Johansen
fb7f0ddaaa Remove tags
apparmor_2.6.0~rc1
  apparmor_2.6.1~rc1

that have crept in yet again!!!
2011-08-19 16:57:30 -07:00
John Johansen
4bdc7ea51a From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-utils: Add support for creds and path operations
References: bnc#564316

 2.6.29 introduced the path security_operations and credentials

 This patch adds support for those operations to the log parser.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>

Resolved merge conflict and removal operation already supported by
the log parser.
Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-18 16:29:48 -07:00
Kees Cook
3ac9f7e676 Due to the Ubuntu multiarch project, internal paths to things keep
changing. Since we arguably shouldn't be hardcoding this kind of
thing, this changes a path around to use the C preprocessor to do the
work of finding the kernel definitions.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-18 18:26:02 -05:00