Commit graph

122 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
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
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
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
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
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
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
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
Dominic Reynolds
704e1e4d36 Initial checkin 2006-08-16 16:32:49 +00:00
Seth Arnold
f9df421131 Ralf Spenneberg fixup for make install target 2006-08-09 22:39:20 +00:00
Steve Beattie
865b21c761 Two changes:
* patch from SUSE autobuild team to not strip binaries
* convert rpm release for the parser and mod_apparmor packages to
  correspond to the svn repository number.
2006-05-31 22:38:30 +00:00
Steve Beattie
2332be980b Fix svn properties. 2006-04-12 21:59:34 +00:00
Steve Beattie
2f1aa5374f Fix Makefile to find new common/ dir.
add svn:keywords and svn:ignore properties
2006-04-12 21:12:39 +00:00
Steve Beattie
e8b349bf47 Update svn:keywords and svn:ignore properties for libapparmor 2006-04-12 20:43:34 +00:00
Steve Beattie
6d3e74907d Import the rest of the core functionality of the internal apparmor
development tree (trunk branch). From svn repo version 6381.
2006-04-11 21:52:54 +00:00