mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 10:07:12 +00:00
Remove obsolete parser testcases. The parser regression tests should
instead be placed here.
This commit is contained in:
parent
6b0de8f6bc
commit
36d643eea9
@ -1,11 +0,0 @@
|
||||
#
|
||||
# $Id: cod.bad_entry 3713 2005-01-19 08:17:38Z sarnold $
|
||||
#
|
||||
/usr/bin/stupid_program {
|
||||
#
|
||||
# This *should* generate an error message, from the unexpected first
|
||||
# character (all entries should start with /.
|
||||
#
|
||||
bin/rm rx
|
||||
/foo/bar/baz r
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
# The parser should spit out the following error for this testfile:
|
||||
# A file can not both inherit AND be unconstrained
|
||||
#
|
||||
/home/greg/wirex/immunix/CoDomain/test/uncon1 {
|
||||
/dev/urandom r
|
||||
/etc/ld.so.cache r
|
||||
/home/greg/wirex/immunix/CoDomain/test/uncon2 iu 0f9a787f80df3c614121665640371727
|
||||
/lib/ld-2.1.3.so x d18dc2b68b01e6e573567f60bbd554e4
|
||||
/lib/libc-2.1.3.so r
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
# The parser should spit out the following error for this file:
|
||||
# An unconstrained file must have execute privileges
|
||||
#
|
||||
/home/greg/wirex/immunix/CoDomain/test/uncon1 {
|
||||
/dev/urandom r
|
||||
/etc/ld.so.cache r
|
||||
/home/greg/wirex/immunix/CoDomain/test/uncon2 u 0f9a787f80df3c614121665640371727
|
||||
/lib/ld-2.1.3.so x d18dc2b68b01e6e573567f60bbd554e4
|
||||
/lib/libc-2.1.3.so r
|
||||
}
|
||||
|
@ -1,113 +0,0 @@
|
||||
# /etc/mfsprofile
|
||||
#
|
||||
# This is the codomain description file.
|
||||
#
|
||||
# Codomain descriptions should be of the following format:
|
||||
#
|
||||
# Commented lines begin with #
|
||||
#
|
||||
# /path/program_name {
|
||||
# /path/resource access_mode digital_signature_if_exe
|
||||
# /path/resource access_mode digital_signature_if_exe
|
||||
# /path/resource access_mode digital_signature_if_exe
|
||||
# }
|
||||
#
|
||||
# Access modes consist of four possible entries: r(ead), w(rite),
|
||||
# x(ecute) and i(nherit) (which is the default anyway).
|
||||
#
|
||||
# A really limited lame form of name_globbing exists: Any
|
||||
# description with a * will match anything following it. E.g.
|
||||
# a resource of "/foo/bar* r" will grant read access to the
|
||||
# following:
|
||||
# /foo/barnyard_animals.gif
|
||||
# /foo/barf/baz/biff/blah
|
||||
# The exception: it will not match things that contain /../ so it
|
||||
# will not match
|
||||
# /foo/bar/../../etc/passwd
|
||||
# This should be improved/made slightly more sophisticated.
|
||||
#
|
||||
# For subdomains, define a codomain for the main program (a
|
||||
# default), then define subdomains in the form of:
|
||||
# /path/to/program^subdomain_ident { \n .... }
|
||||
# with resources on subsequent lines.
|
||||
#
|
||||
# microbenchmarks for subdomain
|
||||
#
|
||||
# Attempt to use md5sum as a prefetching microbenchmark. Sadly, it
|
||||
# didn't work.
|
||||
#
|
||||
# /usr/bin/md5sum {
|
||||
#/etc/ld.so.cache r
|
||||
#/lib/lib* r
|
||||
#/usr/lib/netscape/netscape-communicator r
|
||||
# }
|
||||
#
|
||||
# /bin/gzip {
|
||||
#/etc/ld.so.cache r
|
||||
#/lib/lib* r
|
||||
#/tmp/netscape-communicator r
|
||||
#/tmp/netscape-communicator.gz w
|
||||
# }
|
||||
#
|
||||
# /usr/bin/bzip2 {
|
||||
#/etc/ld.so.cache r
|
||||
#/lib/lib* r
|
||||
#/usr/lib/netscape/netscape-communicator r
|
||||
# }
|
||||
#
|
||||
#
|
||||
/usr/src/codomain-1.2.0-pre2/testprogs/foo.sh {
|
||||
/dev/urandom r
|
||||
./bad r
|
||||
12345678901234567890123456789012345678901234567890123456789012345678901 r
|
||||
123456789012345678901234567890123456789012345678901234567890123456789012 r
|
||||
1234567890123456789012345678901234567890123456789012345678901234567890123 r
|
||||
12345678901234567890123456789012345678901234567890123456789012345678901234 r
|
||||
123456789012345678901234567890123456789012345678901234567890123456789012345 r
|
||||
1234567890123456789012345678901234567890123456789012345678901234567890123456 r
|
||||
12345678901234567890123456789012345678901234567890123456789012345678901234567 r
|
||||
123456789012345678901234567890123456789012345678901234567890123456789012345678 r
|
||||
1234567890123456789012345678901234567890123456789012345678901234567890123456789 r
|
||||
12345678901234567890123456789012345678901234567890123456789012345678901234567890 r
|
||||
12345678901234567890123456789012345678901234567890123456789012 r
|
||||
123456789012345678901234567890123456789012345678901234567890123 r
|
||||
1234567890123456789012345678901234567890123456789012345678901234 r
|
||||
12345678901234567890123456789012345678901234567890123456789012345 r
|
||||
123456789012345678901234567890123456789012345678901234567890123456 r
|
||||
1234567890123456789012345678901234567890123456789012345678901234567 r
|
||||
12345678901234567890123456789012345678901234567890123456789012345678 r
|
||||
123456789012345678901234567890123456789012345678901234567890123456789 r
|
||||
1234567890123456789012345678901234567890123456789012345678901234567890 r
|
||||
1234567890123456789012345678901234567890123456789012345678901 r
|
||||
123456789012345678901234567890123456789012345678901234567890 r
|
||||
12345678901234567890123456789012345678901234567890123456789 r
|
||||
1234567890123456789012345678901234567890123456789012345678 r
|
||||
123456789012345678901234567890123456789012345678901234567 r
|
||||
12345678901234567890123456789012345678901234567890123456 r
|
||||
1234567890123456789012345678901234567890123456789012345 r
|
||||
123456789012345678901234567890123456789012345678901234 r
|
||||
12345678901234567890123456789012345678901234567890123 r
|
||||
1234567890123456789012345678901234567890123456789012 r
|
||||
123456789012345678901234567890123456789012345678901 r
|
||||
12345678901234567890123456789012345678901234567890 r
|
||||
1234567890123456789012345678901234567890123456789 r
|
||||
123456789012345678901234567890123456789012345678 r
|
||||
12345678901234567890123456789012345678901234567 r
|
||||
1234567890123456789012345678901234567890123456 r
|
||||
123456789012345678901234567890123456789012345 r
|
||||
12345678901234567890123456789012345678901234 r
|
||||
1234567890123456789012345678901234567890123 r
|
||||
123456789012345678901234567890123456789012 r
|
||||
12345678901234567890123456789012345678901 r
|
||||
1234567890123456789012345678901234567890 r
|
||||
123456789012345678901234567890123456789 r
|
||||
}
|
||||
#
|
||||
# Roxen
|
||||
#
|
||||
/usr/src/codomain-1.2.0-pre2/testprogs/foo.sh {
|
||||
/dev/urandom r
|
||||
./bad r
|
||||
12345678901234567890123456789012345678901234567890123456789012345678901 r
|
||||
123456789012345678901234567890123456789012345678901234567890123456789012 r
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,50 +0,0 @@
|
||||
#
|
||||
# $Id: cod.negative_domain 3713 2005-01-19 08:17:38Z sarnold $
|
||||
#
|
||||
# /etc/mfsprofile
|
||||
#
|
||||
# This is the codomain description file.
|
||||
#
|
||||
# Codomain descriptions should be of the following format:
|
||||
#
|
||||
# Commented lines begin with #
|
||||
#
|
||||
# /path/program_name {
|
||||
# /path/resource access_mode digital_signature_if_exe
|
||||
# /path/resource access_mode digital_signature_if_exe
|
||||
# /path/resource access_mode digital_signature_if_exe
|
||||
# }
|
||||
#
|
||||
# Access modes consist of four possible entries: r(ead), w(rite),
|
||||
# x(ecute) and i(nherit) (which is the default anyway).
|
||||
#
|
||||
# A really limited lame form of name_globbing exists: Any
|
||||
# description with a * will match anything following it. E.g.
|
||||
# a resource of "/foo/bar* r" will grant read access to the
|
||||
# following:
|
||||
# /foo/barnyard_animals.gif
|
||||
# /foo/barf/baz/biff/blah
|
||||
# The exception: it will not match things that contain /../ so it
|
||||
# will not match
|
||||
# /foo/bar/../../etc/passwd
|
||||
# This should be improved/made slightly more sophisticated.
|
||||
#
|
||||
# For subdomains, define a codomain for the main program (a
|
||||
# default), then define subdomains in the form of:
|
||||
# /path/to/program^subdomain_ident { \n .... }
|
||||
# with resources on subsequent lines.
|
||||
#
|
||||
# microbenchmarks for subdomain
|
||||
#
|
||||
# Attempt to use md5sum as a prefetching microbenchmark. Sadly, it
|
||||
# didn't work.
|
||||
#
|
||||
#
|
||||
/usr/src/codomain-1.2.0-pre2/testprogs/foo.sh ! {
|
||||
/dev/urandom r ,
|
||||
/bad r ,
|
||||
/12345678901234567890123456789012345678901234567890123456789012345678901
|
||||
x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ,
|
||||
/123456789012345678901234567890123456789012345678901234567890123456789012 r ,
|
||||
}
|
||||
#
|
@ -1,23 +0,0 @@
|
||||
#
|
||||
# $Id: cod.negative_domain2 3713 2005-01-19 08:17:38Z sarnold $
|
||||
#
|
||||
# This testfile has a negative change_hat domain, which the parser
|
||||
# should not like.
|
||||
#
|
||||
#
|
||||
/usr/src/codomain-1.2.0-pre2/testprogs/foo.sh ^ bad_child_domain ! {
|
||||
/dev/urandom r ,
|
||||
/bad r ,
|
||||
/12345678901234567890123456789012345678901234567890123456789012345678901
|
||||
x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ,
|
||||
/123456789012345678901234567890123456789012345678901234567890123456789012 r ,
|
||||
}
|
||||
# Parent domain
|
||||
/usr/src/codomain-1.2.0-pre2/testprogs/foo.sh {
|
||||
/dev/urandom r ,
|
||||
/bad r ,
|
||||
/12345678901234567890123456789012345678901234567890123456789012345678901
|
||||
x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ,
|
||||
/123456789012345678901234567890123456789012345678901234567890123456789012 r ,
|
||||
}
|
||||
#
|
@ -1,13 +0,0 @@
|
||||
#
|
||||
# $Id: cod.negative_entry 3713 2005-01-19 08:17:38Z sarnold $
|
||||
#
|
||||
# this is a smaple negative entry, which we no longer support.
|
||||
#
|
||||
/usr/src/codomain-1.2.0-pre2/testprogs/foo.sh {
|
||||
/dev/urandom r ,
|
||||
./bad ! r ,
|
||||
12345678901234567890123456789012345678901234567890123456789012345678901
|
||||
x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ,
|
||||
123456789012345678901234567890123456789012345678901234567890123456789012 r ,
|
||||
}
|
||||
#
|
@ -1,13 +0,0 @@
|
||||
#
|
||||
# $Id: cod.negative_entry2 3713 2005-01-19 08:17:38Z sarnold $
|
||||
#
|
||||
# this is a smaple negative entry, which we no longer support.
|
||||
#
|
||||
/usr/src/codomain-1.2.0-pre2/testprogs/foo.sh {
|
||||
/dev/urandom r ,
|
||||
./bad r ,
|
||||
12345678901234567890123456789012345678901234567890123456789012345678901 !
|
||||
x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ,
|
||||
123456789012345678901234567890123456789012345678901234567890123456789012 r ,
|
||||
}
|
||||
#
|
@ -1,86 +0,0 @@
|
||||
# Profile for cgitest-000.cgi
|
||||
|
||||
/usr/sbin/httpd^/perl/0/cgitest-000.cgi {
|
||||
/usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Registry.pm r
|
||||
/etc/localtime r
|
||||
/usr/lib/perl5/5.00503/* r
|
||||
/tmp/blahb/0/cgitest-000.cgi r
|
||||
/tmp/blahb/0/cgitemplate-000.html r
|
||||
/tmp/blahb/0/cgidata-000 r
|
||||
/var/log/httpd/* w
|
||||
}
|
||||
# 999.cgi
|
||||
|
||||
/usr/sbin/httpd^/perl/0/cgitest-999.cgi {
|
||||
/usr/lib/perl5/site_perl/5.005/i386-linux/Apache/Registry.pm r
|
||||
/etc/localtime r
|
||||
/usr/lib/perl5/5.00503/* r
|
||||
/tmp/blahb/0/cgitest-999.cgi r
|
||||
/tmp/blahb/0/cgitemplate-999.html r
|
||||
/tmp/blahb/0/cgidata-999 r
|
||||
/var/log/httpd/* w
|
||||
}
|
||||
#
|
||||
#
|
||||
/usr/local/apache/bin/httpd {
|
||||
/etc/httpd/php3.ini r
|
||||
/etc/localtime r
|
||||
/lib/ld-linux.so.2 r
|
||||
/etc/ld.so.cache r
|
||||
/lib/lib* r
|
||||
/etc/nsswitch.conf r
|
||||
/home/web/docs r
|
||||
/home/web/docs/* r
|
||||
/home/web/wirex/rna/html* r
|
||||
/home/web/cgi-bin/* x d992c36bd6263845aaa7fab821618151
|
||||
/home/web/perl/* x d992c36bd6263845aaa7fab821618151
|
||||
# Waugh, don't like adding the next one...
|
||||
/etc/passwd r
|
||||
/etc/group r
|
||||
/usr/local/apache/conf/* r
|
||||
/usr/local/apache/libexec/* r
|
||||
/usr/local/apache/logs/* rw
|
||||
/usr/local/apache/logs rw
|
||||
/usr/local/apache/icons/ r
|
||||
/etc/mime.types r
|
||||
/var/run/* rw
|
||||
/usr/lib/libgdbm.so.2* r
|
||||
/usr/lib/libgd.so.1.2 r
|
||||
/usr/lib/libttf.so.2* r
|
||||
/usr/lib/libz.so.1* r
|
||||
/usr/lib/libldap.so.1* r
|
||||
/usr/lib/libpq.so.2* r
|
||||
/usr/lib/liblber.so.1* r
|
||||
/etc/resolv.conf r
|
||||
/etc/localtime r
|
||||
/etc/hosts r
|
||||
/etc/host.conf r
|
||||
/dev/null rw
|
||||
/dev/log rw
|
||||
/dev/urandom r
|
||||
/usr/lib/perl5/* r
|
||||
/usr/share/locale/* r
|
||||
/usr/lib/gconv/* r
|
||||
}
|
||||
#
|
||||
/usr/local/apache/bin/httpd^/mod_php/example.php3 {
|
||||
/home/web/docs/mod_php/example.php3 r
|
||||
/home/web/docs/mod_php/counter.php3 r
|
||||
/home/web/docs/mod_php/data rw
|
||||
/usr/lib/php3.ini r
|
||||
/etc/localtime r
|
||||
}
|
||||
#
|
||||
/usr/local/apache/bin/httpd^/mod_php/bench.php3 {
|
||||
/home/web/docs/mod_php/bench.php3 r
|
||||
/usr/lib/php3.ini r
|
||||
/etc/localtime r
|
||||
}
|
||||
#
|
||||
/usr/sbin/httpd^/mod_php/filestat.phtml {
|
||||
/home/httpd/html/mod_php/filestat.phtml r
|
||||
/home/httpd/html/mod_php/informix.php3 r
|
||||
/usr/lib/php3.ini r
|
||||
/etc/localtime r
|
||||
}
|
||||
#
|
@ -1,8 +0,0 @@
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect to 127.0.0.1 ,
|
||||
tcp_connect to 10.0.0.17 via eth1 ,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect to 10.0.0.17/16:50-100 via eth1 ,
|
||||
tcp_connect to 127.0.0.1 ,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect to 10.0.0.17/16:50-100 from 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 127.0.0.1 ,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect to 10.0.0.17/16:50-100 from 0.0.0.0:50-100 via eth1 ,
|
||||
tcp_connect to 127.0.0.1 ,
|
||||
tcp_connect from 12.13.14.15/31:21,
|
||||
tcp_accept from 12.13.15.128/25:1024-2048 via eth2,
|
||||
tcp_accept from 10.0.1.1/24:1024-2048 to 192.168.1.1:70 via eth2:1,
|
||||
tcp_accept to 192.168.2.1:70 from 10.0.2.1/24:1024-2048 via eth2:2,
|
||||
tcp_connect to 192.168.3.1:70 from 10.0.3.1/24:1024-2048 via eth2:3,
|
||||
tcp_connect from 10.0.4.1/24:1024-2048 to 192.168.4.1:70 via eth2:4,
|
||||
# syntactic suger cdub asked for:
|
||||
udp_send via eth0,
|
||||
udp_receive via eth1,
|
||||
# attempt an ip style netmask
|
||||
tcp_connect from 10.0.4.1/255.0.255.0:1024-2048 to 192.168.4.1:70 via eth2:4,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
#
|
||||
# port 65535 should be valid
|
||||
#
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect to 10.0.0.17/16:1024-65535 from 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 10.0.0.18/16:65535 from 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 127.0.0.1 ,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect to 10.0.0.17/16:50-100 to 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 127.0.0.1 ,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect from 10.0.0.17/16:50-100 from 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 127.0.0.1 ,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
# what happens with a bad ip address?
|
||||
#
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect from 10.0.0.17/16:50-100 to 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 256.0.0.1 ,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
# what happens with a bad netmask?
|
||||
#
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect from 10.0.0.17/16:50-100 to 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 127.0.0.1/256.512.1024.1,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
# what happens with some bad portnumbers?
|
||||
#
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect from 10.0.0.17/16:50-100 to 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 127.0.0.1:100000,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
# what happens with a bad netmask?
|
||||
#
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect from 10.0.0.17/16:50-100 to 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 127.0.0.1/64,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
# what happens with odd ordering of portnumbers?
|
||||
#
|
||||
/tmp/tcp/tcp_client {
|
||||
tcp_connect from 10.0.0.17/16:50-100 to 127.0.0.1 via eth1 ,
|
||||
tcp_connect to 127.0.0.1:100-50,
|
||||
/lib/libc.so.6 r ,
|
||||
/lib/ld-linux.so.2 r ,
|
||||
/etc/ld.so.cache r ,
|
||||
/lib/libc-2.1.3.so r ,
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user