Commit graph

765 commits

Author SHA1 Message Date
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
Steve Beattie
16ede09541 Fix a tyop and add corresponding profile names for other error
conditions.
2006-09-13 20:06:16 +00:00
Steve Beattie
e291f9933e Add a user tunable setting to add arguments to the parser invocations,
if necessary.  Currently used to suppress warnings about unsafe/unfiltered
environment 'u' exec transitions. 

[Corresponds to rev 6415 in the old svn repo]
2006-09-13 18:40:52 +00:00
Steve Beattie
c59d7489be [This commit corresponds to revs 6425 and 6429 in the old svn repo]
This commit adds a test that checks to see if exec unconfined -->
confined requires any access to the binary being run confined. Current
behavior is that it does not.
2006-09-12 22:22:51 +00:00
Steve Beattie
5bc7850467 Convert the struct expected by ptrace.c to be struct user from
asm-xxx/user.h rather than struct user_regs_struct, as we had a report
that that wasn't available on some arches.
2006-09-12 20:57:29 +00:00
Steve Beattie
76cbeb9892 [This corresponds to commits 6414, 6415, 6417, 6422, 6423, and 6424 in
the old svn tree.]

This patch adds tests to verify the environment filtering done in the Px
and Ux cases. It tests the environment from both an elf executable and
from a shell script. Also verifies that with the apparmor module loaded,
environment filtering on setuid apps still happens.
2006-09-12 05:55:31 +00:00
Steve Beattie
1cd7fe23d4 [https://bugzilla.novell.com/show_bug.cgi?id=129516]
Relicense file to GPL (don't know why it wasn't caught originally). Made
it look in the right location, but doesn't appear to function -- I don't
know if that's due to language changes or if it ever worked. Seth Arnold
will need to comment.
2006-09-11 21:46:44 +00:00
Steve Beattie
08651d770b [https://bugzilla.novell.com/show_bug.cgi?id=203557]
Add support for python egg archives as well as python 2.5. Perhaps the
python version should be seperated into a variable?
2006-09-11 21:17:43 +00:00
Steve Beattie
2803303d19 Have svn ignore autogenerated .mo files 2006-09-11 20:20:54 +00:00
Steve Beattie
aa470621a4 Check in an internationalization change that got missed in the 'm' mode
update.
2006-09-11 20:12:47 +00:00
John Johansen
c235cfb8aa Add the Kbuild files that got add in the Makefile patch but weren't added to svn 2006-08-30 00:55:04 +00:00