Commit graph

5425 commits

Author SHA1 Message Date
Steve Beattie
a3a6238378 Complete renaming of apache2-mod-apparmor to apache2-mod_apparmor.
(part two of two)
2006-10-31 16:58:13 +00:00
Steve Beattie
9105494945 Rename apache2-mod-apparmor to apache2-mod_apparmor to conform to SUSE
style (even if it means a consistent name can't be used on debian :-/).
(part one of two).
2006-10-31 16:56:11 +00:00
Steve Beattie
ce1b32a773 This patch updates the change_hat(2) manpage, to better reflect the
(updated) error codes returned by the module and the libapparmor
function. It also converts the package to use the svn repo version as
the package version.
2006-10-31 16:49:36 +00:00
Steve Beattie
53f1a9cdc5 (from jmichael@suse.de)
This patch adds support for a 'debug' flag to the pam_apparmor pam
module, which will cause it to report more of its attempted operations
to syslog.
2006-10-31 16:33:02 +00:00
Steve Beattie
8cf0339798 Set svn:keywords proprty on added files from last commit. 2006-10-31 16:02:07 +00:00
Steve Beattie
36523dc023 This (updated) patch provides some limited configurability for
pam_apparmor pam module. The default behavior is to use the user's
primary groupname, and to fall back to the DEFAULT hat. You can change
this behavior by appending order=type1[,type2,type3] to the pam_apparmor
session line in the pam config for the application you're applying
pam_apparmor to. The available types are 'user' for username, 'group'
for groupname, and 'default' for DEFAULT. Thus, adding a configuration
entry like:

  session  optional       pam_apparmor.so order=group,default

is equivalent to the default behavior for pam_apparmor.

The parse_option code got a little more complicated than I'd hoped
it would be; I could have just had types by space delimited options to
module, but I thought I'd leave open the possibility of adding additional
options to the module ('debug' immediately comes to mind).

I disabled the short-circuit that occurs if EPERM is returned by
change_hat, as we can't detect that this is because there's no hats or
that the application is entirely undefined; if ECHILD makes it in then
we can re-enable this.

I am less convinced now that pam_apparmor needs to be 'optional' than
'required'; killing the session if none of the change_hats succeeds is
starting to feel like reasonable behavior.

---
 changehat/pam_apparmor/Makefile             |   11 +
 changehat/pam_apparmor/README               |   74 +++++++++++++
 changehat/pam_apparmor/get_options.c        |  157 ++++++++++++++++++++++++++++
 changehat/pam_apparmor/pam_apparmor.c       |  155 +++++++++++++++++++--------
 changehat/pam_apparmor/pam_apparmor.h       |   56 +++++++++
 changehat/pam_apparmor/pam_apparmor.spec.in |    2 
 6 files changed, 406 insertions(+), 49 deletions(-)
2006-10-31 15:54:47 +00:00
Steve Beattie
63712f92db * Sat Oct 28 2006 - olh@suse.de
- boot.apparmor should start after boot.localfs (#215156)
2006-10-31 15:33:10 +00:00
Seth Arnold
45768e06b1 set svn:keywords on new profile 2006-10-31 14:27:54 +00:00
Seth Arnold
888bb58330 lost profile, not sure why it wasn't checked in earlier 2006-10-31 14:26:09 +00:00
Steve Beattie
59f30353a1 This patch adds a 'make dist' target to all the apparmor packages, which
creates a tarball i(and specfile) similar to 'make tarball' except that
it uses svn export to pull the latest committed version rather than the
currently contents of the tree (as make tarball does). This is to make
pristine checkins to SUSE's autobuild system and the openSUSE
buildservice easier.
2006-10-31 14:08:34 +00:00
Steve Beattie
36b6bb11bf Add license/COPYING file. We use the same license as Linux PAM here as
(according to the comments) the code started out based on the pam_motd
module (included with that package).
2006-10-25 20:28:40 +00:00
Steve Beattie
2a67f47bce Remove automatic editing of pam's session-common files.
Use RPM_OPT_FLAGS for CFLAGS when building with rpm.
Cleanup older tarballs during make clean.
2006-10-25 20:13:48 +00:00
Dominic Reynolds
60b7e59a89 Missing checkins for syntax checks. 2006-10-25 17:19:14 +00:00
John Johansen
42859f0b48 This patch fixes some audit error messages that apparmor generates in 2.6.18.
It turns out that audit and selinux were modified to slightly change the
behavior of getprocattr.

The changes are:
1.  when the audit subsystem calls security_getprocattr it only allows
    for a return code of EINVAL

2.  when the audit subsystem calls security_getprocattr with the size
    paramter set to 0.  It expects the returned size to be the size
    that would be put in the buffer.

    This behavior is undocumented in LSM but the changes showed up in
    audit and selinux.


This patch fixes AA so that when 0 is passed it will return the size
that would have been read.  This in turn fixes the problem where the
audit system spits out a ton of
error in audit_log_task_context messages

the AA getprocattr handling can still return error messages that are
not EINVAL but these should not happen in the audit log context unless
audit makes an error.

The possible places are:
- audit passes a buffer that is to small - this shouldn't happen since
  audit uses the return value from a prob with parameter size == 0
- audit task context is trying to read a /proc/<pid>/attr/current that is
  the current tasks context.
  This shouldn't happen since the task context is for the current task.
- memory allocation fails
  This one will generate the message but the audit code its self will
  generate the message if its allocation fails.
2006-10-24 22:29:34 +00:00
John Johansen
8c1bf90305 This patch modifies the changehat interface to return EPERM instead
of EACCESS when an unconfined process calls changehat.  This enables
applications using the changehat api to detect that the application
is not confined so probing for a matching hat can be aborted.
2006-10-24 22:24:44 +00:00
John Johansen
ddfbd98849 This patch modifies the changehat interface to return EPERM instead
of EACCESS when an unconfined process calls changehat.  This enables
applications using the changehat api to detect that the application
is not confined so probing for a matching hat can be aborted.
2006-10-24 22:23:21 +00:00
John Johansen
d2c636b859 regression tests for changehat returning eperm when an application is unconfined and tries to do a changehat 2006-10-24 22:15:32 +00:00
Jesse Michael
648cbe970c - change pam_apparmor to try to change to a hat based on the name of the
user's primary group instead of one based on their username.
- add new calls to pam_syslog() to aid in diagnosing problems.
2006-10-23 18:12:39 +00:00
John Johansen
e813acfd50 fix a small race condition where is_done is set before the thread is actually done. 2006-10-18 21:12:30 +00:00
Seth Arnold
86f5b210b9 https://bugzilla.novell.com/show_bug.cgi?id=178073
add full /etc/postfix/*.db read access to all postfix programs. This is
just easier.
Also let the smtp portion write to the rewrite pipe.
2006-10-18 20:13:42 +00:00
Dominic Reynolds
8098087993 Moved definition of variables to top of spec file. The previous
placement (between %description and %prep) caused a problem with the
build system.
2006-10-17 17:00:15 +00:00
Dominic Reynolds
54591d5804 Remove whitepace indent on %define of CATALINA_HOME in the spec file - as it was not getting expanded with the indent by the build system. 2006-10-17 14:55:53 +00:00
Steve Beattie
415de7ba8e Add a configurable setting for the location of ldconfig; convert
libapparmor to using ldconfig to generate its so-version library
symlink.
2006-10-16 21:08:58 +00:00
Dominic Reynolds
b4abae7ebc Packaging changes for build system, added check for EPERM to detect
errors when process is not confined (or other error).
2006-10-16 20:48:28 +00:00
Dominic Reynolds
1a3dc3f609 Removed spec example. Added file that got missed during previous
checkin.
2006-10-14 19:30:14 +00:00
John Johansen
b2b21d0940 new build infastructure for kernel patch releases 2006-10-13 05:12:41 +00:00
Steve Beattie
34437da2a3 Eliminate obsolete /subdomain (#160020)
Also add some history to the changelog in the specfile, clean up some
whitespace issues, eliminate no longer needed bogus LC_MESSAGES dir to
work around SUSE autobuild, seems to have been addressed.
2006-10-12 18:36:43 +00:00
John Johansen
8871ece1d3 remove broken kernel patches release 2006-10-12 15:57:41 +00:00
John Johansen
0ee79cf174 removing trailing whitespace that slipped in 2006-10-12 08:24:38 +00:00
John Johansen
2f5ce57043 removing trailing whitespace that slipped in 2006-10-12 08:22:00 +00:00
John Johansen
f4a1eeed53 add missing Kconfig file 2006-10-12 02:38:26 +00:00
Steve Beattie
d25c6c8fcd Convert pam_apparmor package to just use the svn repo version for its
minor revision number.
2006-10-11 17:59:44 +00:00
Steve Beattie
398ef08bf4 This patch adds support for including all the files within a directory
by naming the directory (e.g. #include </etc/apparmor.d/abstractions>).
It will skip over dotfiles and as well as subdirectories. It is intended
to make scripting and packaging easier, as the including profile will
not need to know explicitly all of the names to include.

Long term, rather than hardcode that dotfiles will be skipped, it should
be configurable via /etc/apparmor.d/subdomain what patterns of files
should be skipped; genprof/logprof should also honor this setting. The
code could be reused as I'd like to make the parser just take a directory
on the command line rather than being fed profiles one at a time; again
it would skip files based on these same patterns.

This patch also eliminates some dead code in the include processing, as
well as replaces a couple of undersized fixed-size buffer (PATH_MAX is
4095 on linux, buffer is not overflowable due to use of strncpy/snprintf)
with dynamically allocated ones.
2006-10-10 21:36:10 +00:00
John Johansen
0311d6b4c1 fix for 2.6.18 security_netlink_recv parameter changes 2006-10-10 20:30:04 +00:00
John Johansen
2e0486b11c fix for modified 2.6.18 lsm security_netlink_recv 2006-10-10 20:27:38 +00:00
John Johansen
5a2e54261a set the module version flag 2006-10-10 19:13:41 +00:00
John Johansen
201887e519 fix broken checking of the name tag in the interface code 2006-10-10 19:03:05 +00:00
John Johansen
6a3311a818 port of lazy alloc of subdomain patch 2006-10-10 19:01:57 +00:00
John Johansen
8d1f5da9b4 fix mistakes in porting of security fixes 2006-10-10 18:59:50 +00:00
Dominic Reynolds
2ea2871282 Removed 2006-10-06 20:09:45 +00:00
Dominic Reynolds
1fe7e92955 Added checks for profile syntax and error dialogs in the yastui. 2006-10-05 21:29:22 +00:00
John Johansen
c231a42cf4 add apparmor patches for kernels 2.6.16, 2.6.17, 2.6.18 2006-09-28 20:25:18 +00:00
Steve Beattie
84a0136a88 Add a new testcase for #include statements that are on the same line as
file rules.
2006-09-28 16:47:11 +00:00
Steve Beattie
5b3efd982f Unfortunately, the forge website(s) don't provide information on how to
use the change_hat(2) function; point them at the manpage for usage
information.
2006-09-28 06:45:55 +00:00
Dominic Reynolds
488f7fcc89 Disabled ar.po language as the po file in suse-i18n contains errors that
cause msgfmt and the build to fail.
2006-09-26 19:02:29 +00:00
Dominic Reynolds
9d3ae5ec8a Added/updated po files from lcn repo:
https://forgesvn1.novell.com/svn/suse-i18n
2006-09-26 18:32:52 +00:00
Dominic Reynolds
ce4ae3f281 Updated error message text - feedback from proofreaders. 2006-09-26 18:01:06 +00:00
Dominic Reynolds
6393f224e5 Small text change to celanup spaces. The xgettext claimed the line was
not ascii so wouldn't regenerate the pot file.
2006-09-22 16:33:27 +00:00
Steve Beattie
0961fb5a5b This checkin fixes the environ.sh to work on 64bit systems (with /lib64/
directories). It also disables the longpath test (after locking up
another machine from running it), but adds a 'make alltests' target
which will run all the tests plus that one (and any others defined in
the RISKY_TESTS variable.)
2006-09-15 22:39:59 +00:00
Jesse Michael
4f4a56859e Thorsten Kukuk (kukuk@suse.de) pointed out a couple problems with
pam_apparmor and here's a patch to address most of them--

 * header comment was incorrect
 * use pam_get_user() instead of pam_get_item()
 * return an error if we're unable to change to the DEFAULT hat

In addition, this has a fix to make sure that the magic token we read
from /dev/urandom is not null (which would cause the hat probing to fail 
if we need to fall back to the DEFAULT hat).
2006-09-14 12:44:01 +00:00