Commit graph

1358 commits

Author SHA1 Message Date
John Johansen
015df061e3 Named transition - but disabled due to a bug 2008-04-16 04:45:02 +00:00
John Johansen
db34aac811 Basis for named transitions 2008-04-16 04:44:21 +00:00
John Johansen
051a3f8c01 add missing parser_alias.c + fix parameter bug in parser.h 2008-04-11 17:43:22 +00:00
Steve Beattie
666a8ec51b Fix up prototype error. 2008-04-10 22:24:35 +00:00
John Johansen
3092aaa821 Various profile updates touching on bnc#255270, bnc#331444, bnc#307365
bnc#230700
2008-04-10 08:54:05 +00:00
John Johansen
c6666773d9 update config to point the repo to 11.0 2008-04-10 08:51:29 +00:00
John Johansen
9961c4b895 skip vim swp files in the profile dir. bnc#205105 2008-04-10 08:40:52 +00:00
John Johansen
e59f8bfd29 fix bnc@304205. Stop redefining LC_MESSAGES when it yast has alread
defined it.
2008-04-10 08:25:23 +00:00
John Johansen
6850b933dc Fix bnc#257286, so that if complain or enfore fail to load the profile,
they will fail and dump the profiles error message.
2008-04-10 07:25:46 +00:00
John Johansen
16b5a26306 update for ptrace rules 2008-04-09 23:56:31 +00:00
John Johansen
4dd0e8ead8 allow for ptrace rules 2008-04-09 09:04:08 +00:00
John Johansen
78590d1823 allow for simpe alias rules 2008-04-09 09:03:17 +00:00
John Johansen
b742da7751 allow <= to be used instead of subset in link rules 2008-04-09 09:02:51 +00:00
John Johansen
add2b93657 update interface version 2008-04-08 20:30:06 +00:00
John Johansen
4016ae5fb3 bump version to 2.3 2008-04-07 18:37:57 +00:00
John Johansen
26e1f20262 rename-rlimit.diff to apparmor-rlimit.diff 2008-04-07 18:00:34 +00:00
John Johansen
2ed2bc67f0 merge patches down to start cleaning up 2008-04-07 17:55:03 +00:00
John Johansen
1daeaa9308 reorder patches in preparation for patch merging 2008-04-07 17:48:20 +00:00
John Johansen
d3eb6500f5 oops, reenable setting the rlimits 2008-04-07 14:51:26 +00:00
John Johansen
aef0eb93dd Fix rlimits so that it doesn't try to do nproc checks when moving
to an unconfined state; which would result in dereferencing a null
profile pointer.
2008-04-07 04:47:08 +00:00
John Johansen
aba82ff427 reject rlimit cpu in the parser 2008-04-07 04:26:02 +00:00
John Johansen
831f2e252c add missing tests 2008-04-06 18:57:05 +00:00
John Johansen
ecf6b55baf let a profile control a tasks rlimits 2008-04-06 18:55:46 +00:00
John Johansen
34f2c96700 let a profile set a tasks caps, similar to fscaps 2008-04-06 18:55:27 +00:00
John Johansen
13e04a9f02 update of unattached profile to require profile keyword 2008-04-06 18:54:52 +00:00
John Johansen
d4c9f0ad0c recommit namespace update to use :namespace: 2008-04-06 18:53:59 +00:00
John Johansen
c460dcc52f update change_hats rules to generate rules for all hats 2008-04-06 18:52:47 +00:00
John Johansen
6f65e6e8f5 A fix-dfa.diff
- rework how null transitions are done.

M    fix-profile-namespaces.diff
- fix namespaces to use the :namespace: syntax

A    cap-set.diff
- allow a profile to set a tasks capabilities similar to fscap

A    rlimits.diff
- allow control of a tasks rlimits
2008-04-06 18:50:37 +00:00
John Johansen
5f5aeee472 Allow for profiles without attachment, ie. they don't begin with /
currently profile names can not collide with file modes nor with
keywords
2008-04-05 05:47:49 +00:00
John Johansen
bbd31c70a1 change namespaces to use the :namespace: format 2008-04-05 05:46:06 +00:00
John Johansen
74152bbd9d Add the implicit change_hat rules for hats in the profile.
Allow external hats by declaring them in the profile via
  ^hatname,

eg.
  /foo {
     ^local_hat {

     }

     ^external_hat,
  }

  /foo//external_hat {

  }
2008-04-05 05:44:44 +00:00
John Johansen
81d40bd281 Fix profile namespace to use :namespace: format, and allow for profiles
that don't begin with /
2008-04-05 05:40:15 +00:00
John Johansen
ec08477129 fix type on typename in cast bug 2008-04-05 04:57:51 +00:00
John Johansen
3bbca91391 fix fatal errors so that they don't exit with an exit code of 0 when no
previsous tests failed.  Instead have fatal errors always exit with
a exit code of 127
2008-03-28 07:17:14 +00:00
John Johansen
6b6c045fbf Update ptrace test
- fix some races that could lead to tests randomly failing
- extend tests to test more combinations
2008-03-27 17:27:39 +00:00
John Johansen
e103873eb2 merge over r1151 - update to exec.sh test which allows it to run on
64 bit platforms using /lib64
2008-03-27 01:16:40 +00:00
John Johansen
a3c0753b89 Add Audit control to AppArmor through, the use of audit and deny
key words.  Deny is also used to subtract permissions from the
profiles permission set.

the audit key word can be prepended to any file, network, or capability
rule, to force a selective audit when that rule is matched.  Audit
permissions accumulate just like standard permissions.

  eg.
  audit /bin/foo rw,

  will force an audit message when the file /bin/foo is opened for
  read or write.

  audit /etc/shadow w,
  /etc/shadow r,
  will force an audit message when /etc/shadow is opened for writing.
  The audit message is per permission bit so only opening the file
  for read access will not, force an audit message.

  audit can also be used in block form instead of prepending audit
  to every rule.

  audit {
    /bin/foo rw,
    /etc/shadow w,
  }
  /etc/shadow r,	# don't audit r access to /etc/shadow


the deny key word can be prepended to file, network and capability
rules, to result in a denial of permissions when matching that rule.
The deny rule specifically does 3 things
- it gives AppArmor the ability to remember what has been denied
  so that the tools don't prompt for what has been denied in
  previous profiling sessions.
- it subtracts globally from the allowed permissions.  Deny permissions
  accumulate in the the deny set just as allow permissions accumulate
  then, the deny set is subtracted from the allow set.
- it quiets known rejects.  The default audit behavior of deny rules
  is to quiet known rejects so that audit logs are not flooded
  with already known rejects.  To have known rejects logged prepend
  the audit keyword to the deny rule.  Deny rules do not have a
  block form.

eg.
  deny /foo/bar rw,
  audit deny /etc/shadow w,

  audit {
     deny owner /blah w,
     deny other /foo w,
     deny /etc/shadow w,
  }
2008-03-13 17:39:03 +00:00
John Johansen
36ad7de2c5 Add the ability to specify link subset test on a link pair, and
fix a bug where link pairs could get improperly merged.
2008-03-13 16:49:10 +00:00
John Johansen
d2eeef8291 extend the flags in preparation for audit control 2008-03-13 16:46:53 +00:00
John Johansen
814773b2e1 Update the parse to emit a 0 to seperate pairs in the dfa.
This was always the intended behavior and fixes a bug where
the dfa will match change profile rules using // seperator.
2008-03-13 16:46:19 +00:00
John Johansen
923fc92c7a M split_init.diff
- fix split init so that apparmor can be enabled at the boot command line.
  The init was broken so that apparmor couldn't be enabled unless enabled
  by default.

M    apparmor-fix-lock-letter.diff
- fix the lock letter being reported (z -> k) and update some comments

A    apparmor-create-append.diff
- fix semanitc bug where full write perms were needed to create a new file,
  where only append is needed.

M    fix-link-subset.diff
- partial fix of link subset
A    no-safex-link-subset.diff
- more link subset fixes

A    audit-log-type-in-syslog.diff
- fix audit type being missing when messages go to syslog.  This patch
  is needed for apparmor to work when messages go to syslog instead of
  auditd.  This patch can be dropped when upstream includes the
  patch to report audit number when reporting to syslog

A    audit-uid.diff
- report the fsuid to the log

A    hat_perm.diff
- setup to use hat permissions instead of just profile search for
  2.3

A    apparmor-failed-name-error.diff
- fix a bug where on failed name resolution no error or information is
  output.  It now reports info in the status field and includes an
  error_code

A    extend-x-mods.diff
- extend the x-mods in preparation of audit ctl

A    apparmor-secondary-accept.diff
- extend the dfa to have a second accept table used for audit ctl

A    apparmor-audit-flags2.diff
- extend apparmor to support audit ctl of individual permissions.
- finish fixing link-subset

A    fix-change_profile-namespace.diff
- Not applied, ignore
2008-03-13 16:36:38 +00:00
John Johansen
d870116ae5 fix bnc#304205. This results in the following warning, when a profile already
exits but doesn't have a flags=(X) component.

Use of uninitialized value in substitution (s///) at
       /usr/lib/perl5/vendor_perl/Immunix/SubDomain.pm line 4687 (#1)
   (W uninitialized) An undefined value was used as if it were already
   defined.  It was interpreted as a "" or a 0, but maybe it was a mistake.
   To suppress this warning assign a defined value to your variables.

   To help you figure out what was undefined, perl tells you what operation
   you used the undefined value in.  Note, however, that perl optimizes your
   program and the operation displayed in the warning may not necessarily
   appear literally in your program.  For example, "that $foo" is
   usually optimized into "that " . $foo, and the warning will refer to
   the concatenation (.) operator, even though there is no . in your
   program.
2008-03-13 15:12:30 +00:00
John Johansen
6eb48919ee Add test cases for user::other perms, error_code, namespaces, fsuid that got left out of previous commit 2008-03-13 10:57:46 +00:00
John Johansen
aed6f06800 Fix bug where genprof/logprof would just die on newer mode format.
This does not allow genprof/logprof to enable features using the
new format, just work with the new style logs.
2008-03-13 10:49:44 +00:00
John Johansen
fe2502ed2d - Add support for fsuid & error_code.
- Fix leak in not freeing namespace.
- Add tests
  - old style link
  - log with namespace, user::other perms, fsuid, error_code
2008-03-11 14:37:40 +00:00
John Johansen
db7fe20a54 Update the link subset test to reflect the newer link semantics
- safe exec is no longer considered a subset of unsafe exec
- add tests for pix permission to link subset
2008-03-08 10:23:19 +00:00
John Johansen
ed4e639d7e make longpath a default test 2008-03-08 04:17:40 +00:00
John Johansen
7e69d3c91c add more missing files 2008-03-08 02:49:17 +00:00
John Johansen
aec1d504fe Update library to support messages fed a dispatcher from audit. Audit
sends messages to dispatcheres without the type=X string prepended.
So update the library so the dbus dispatcher doesn't have to prepend
the audit type information before trying to parse the message.
2008-03-02 12:57:39 +00:00
John Johansen
a0cafba8c5 This patch modifies the logparsing portion of libapparmor to reverse map
ip protocol numbers to their names (e.g. 6 -> "tcp").
2008-02-26 12:30:48 +00:00