Commit graph

323 commits

Author SHA1 Message Date
John Johansen
40c3686041 remove old netdomain syntax 2007-11-16 09:34:01 +00:00
John Johansen
c841a140b3 make the use of flags= optional 2007-11-16 09:31:33 +00:00
John Johansen
20d5d20855 tests for pix exec mode 2007-11-16 09:28:30 +00:00
John Johansen
230b04231c add pix transition mode 2007-11-16 09:27:34 +00:00
John Johansen
92a569fdb3 profile namespace tests 2007-11-16 09:22:49 +00:00
Steve Beattie
cfef502c54 Basic change_profile testcases, basic network rules testcases, testcases
around carat symbols and commas in file rules, and basic permission
modes first testcases from jjohansen@suse.de.

Acked-By: Steve Beattie <steve@nxnw.org>
2007-10-01 06:34:27 +00:00
Steve Beattie
815c103488 lock mode bit tests from jjohansen@suse.de
Also, make 'check' toplevel target be an alias for 'tests'

Acked-By: Steve Beattie <steve@nxnw.org>
2007-10-01 06:12:26 +00:00
Steve Beattie
4e0679ecc6 Append testcases from jjohansen@suse.de.
Acked-By: Steve Beattie <steve@nxnw.org>
2007-10-01 06:04:18 +00:00
John Johansen
87b55accec Allow inverted character classes in non-quoted pathnames. This conflicts
with old style hats but we haven't allowed for them for a couple of years.

Disable tests that check for old style hats.
2007-05-10 05:21:44 +00:00
Steve Beattie
9467d933df Add a little more oddball space formatting test of hat definitions. 2007-05-08 06:28:08 +00:00
Steve Beattie
4e2bf5ab74 Resurrect apparmor-docs package, this time as a subpackage of
apparmor-parser. The html version of the parser manpages as well as pdf,
html, and text versions of the techdoc are included in the -docs
package.

Disabled a regression stress test that is a bit problematic on 64bit
arches; the stress test itself is a bit absurd given how many rules it
generates.
2007-04-14 04:48:56 +00:00
Steve Beattie
90c9b5c0cd This patch fixes the apparmor parser tst Makefile to not use popd/pushd
bashisms which were in place to get around PWD not getting set
correctly. Instead, fix the simple.pl script to call pwd directly.
Based on feedback from PLD/Arkadiusz Miskiewicz <arekm@maven.pl>.
2006-12-15 08:10:25 +00:00
Steve Beattie
6b54cce437 This patch removes using the libcap-devel capability header, and only
uses the linux kernel definitions of them.

(It also adds to the simple capbilities regression tests verifying the
parser can parse the new audit capiability names.)
2006-11-08 10:59:09 +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
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
John Johansen
c13b341fef add parser test files that I failed to add when the parser m and P patches where committed 2006-08-04 17:24:51 +00:00
John Johansen
3cb147e25c [https://bugzilla.novell.com/show_bug.cgi?id=172061]
This (updated) patch to trunk adds support for Px and Ux (toggle
bprm_secure on exec) in the parser, As requested, lowercase p and u
corresponds to an unfiltered environmnet on exec, uppercase will filter
the environment.  It applies after the 'm' patch.

As a side effect, I tried to reduce the use of hardcoded characters in
the debugging statements -- there are still a few warnings that have
hard coded letters in them; not sure I can fix them all.

This version issues a warning for every unsafe ux and issues a single
warning for the first 'R', 'W', 'X', 'L', and 'I' it encounters,
except when the "-q" or "--quiet" flag , "--remove" profile flag, or
"-N" report names flags are passed.  Unfortunately, it made the logic
somewhat more convoluted.  Wordsmithing improvements welcome.
2006-08-04 17:14:49 +00:00
Steve Beattie
8cdcb6f0ea Set properties on parser testfiles 2006-06-01 17:02:28 +00:00
Steve Beattie
08a4b5ce52 Set svn keyword properties on a couple of missed files. 2006-05-31 21:44:14 +00:00
Steve Beattie
dd2d41bae8 Make the build process significantly quieter with respect to the unit
and regression tests to avoid developer confusion.
2006-05-31 21:30:50 +00:00
Steve Beattie
84ff459a53 Default to using the parser in the parent directory, and build it if it
doesn't exist.
2006-05-02 17:19:50 +00:00
Steve Beattie
1b56f269dd This change does a few things:
- adds a distinct includes/ subdirectory, populated with a couple of
    files that test profiles can include. We purposefully choose to use
    a different directory structure than the shipped profile set so that
    changes to it will not break our tests.
  - modifies the existing test profiles to take advantage of the
    includes/ directory.
  - modifies tst/Makefile with pushd/popd to get around some pwd
    limitations in the parser (that need to be fixed).
2006-05-02 16:15:41 +00:00
Steve Beattie
bc9d0ee80b MOve the parser regression tests to the parser package itself. 2006-04-13 20:38:37 +00:00