2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

MOve the parser regression tests to the parser package itself.

This commit is contained in:
Steve Beattie
2006-04-13 20:38:37 +00:00
parent 06f3ea1313
commit bc9d0ee80b
136 changed files with 0 additions and 0 deletions

View File

@@ -1,12 +0,0 @@
#
# $Id: Makefile 4312 2005-04-17 07:41:31Z steve $
#
PROVE=/usr/bin/prove -v
TESTS=simple.pl
all: tests
.PHONY: tests
tests:
${PROVE} ${TESTS}

View File

@@ -1,64 +0,0 @@
This is the README for the SubDomain parser regression testsuite.
Running the testsuite
---------------------
Running the tests is pretty easy, a simple 'make tests' should make it
go, assuming the subdomain parser and perl are installed.
There is a user configuration file 'uservars.conf'. If you wish to test
against a different parser, or use a different set of profiles for the
simple.pl test, you can change those settings in 'uservars.conf'.
Adding to the testsuite
-----------------------
The testsuite currently contains one testscript (simple.pl) and makes use
of perl's Test::Simple, Test::Harness, and prove utilities (see 'perldoc
Test::Tutorial', 'perldoc Test::Simple', 'perldoc Test::Harness', and
'man 1 prove' for more information on these).
It should be relatively easy to extend the suite with other testscripts,
as long as they're written using Test::Simple or can emulate the
Test::Harness protocol. To add a script, add it to the TESTS variable
in the Makefile, and it will included in the tests to be run.
However, in many cases, it is not necessary to add an entire new
testscript for a testcase. Instead, the simple testcase (see below)
will run all the profiles it finds on the parser, thus adding testcases
is usually as simple as writing a new profile with a couple of extra
comments.
Simple parsing tests (simple.pl)
--------------------------------
This test script tests the parser front end's ability to identify legal
profiles. It does this by running the parser against several legal and
illegal profiles (in debug mode, so as not to load them into the module
proper)
The simple script has the parser attempt to parse all of the profiles
named *.sd in the simple_tests/ subdirectory; thus, to add a new profile
to test, simply add it to the simple_tests/ directory. The simple script
also adds the testdir (simple_tests/ by default) to the parsers include
path (assuming that particular bug has been fixed :-)).
The simple script looks for a few special comments in the profile,
#=DESCRIPTION, #=EXRESULT, and #=TODO:
- #=DESCRIPTION -- all text following the keyword is considered a
description for the test. Please try to make these meaningful.
- #=EXRESULT -- This records the expected result of parsing this
profile. Values can either be PASS or FAIL; if no comment is found
that matches this pattern, then the profile is assumed to have an
expected parse result of PASS.
- #=TODO -- marks the test as being for a future item to implement and
thus are expected testsuite failures and hsould be ignored.
- #=DISABLED -- skips the test, and marks it as a failed TODO task.
Useful if the particular testcase causes the parser to infinite
loop.
Otherwise, the profile is passed on as-is to the subdomain parser.
$Id: README 5937 2005-12-15 23:17:02Z steve $

View File

@@ -1,116 +0,0 @@
#!/usr/bin/perl -w
#
# A simple driver for testing the subdomain parser.
# All files in $CWD named *.sd will be tested against the parser.
#
use strict;
use Getopt::Long;
use Test::More;
my $__VERSION__='$Id: simple.pl 5924 2005-12-14 19:09:04Z steve $';
my %config;
$config{'parser'} = "/sbin/subdomain_parser";
$config{'profiledir'} = "./simple_tests/";
my $help;
GetOptions(
"help|h" => \$help,
);
sub usage {
print STDERR "$__VERSION__\n";
print STDERR "Usage $0 profile_directory\n";
print STDERR "\tTests the subdomain parser on the given profile directory\n";
print STDOUT "Bail out! Got the usage statement\n";
exit 0;
}
&usage if ($help);
read_config();
# Override config file profile location when passed on command line
if (@ARGV >= 1) {
$config{'profiledir'} = shift;
}
if ($config{'profiledir'} =~ /^\//) {
$config{'includedir'} = $config{'profiledir'};
} else {
$config{'includedir'} = "$ENV{'PWD'}/$config{'profiledir'}";
}
sub read_config {
my $which;
if(open(CONF, "uservars.conf")) {
while(<CONF>) {
chomp;
next if /^\s*#/;
if (m/^\s*(\S+)\s*=\s*(.+)\s*$/) {
my ($key, $value) = ($1, $2);
$config{$key} = $value;
}
}
close(CONF);
}
}
sub test_profile {
my $profile = shift;
my $description = "no description for testcase";
my $expass = 1;
my $istodo = 0;
my $isdisabled = 0;
open(PARSER, "| $config{'parser'} -S -I $config{'includedir'} > /dev/null 2>&1") or die "Bail out! couldn't open parser";
open(PROFILE, $profile) or die "Bail out! couldn't open profile $profile";
while (<PROFILE>) {
if (/^#=DESCRIPTION\s*(.*)/) {
$description = $1;
} elsif (/^#=EXRESULT\s*(\w+)/) {
if ($1 eq "PASS") {
$expass = 1;
} elsif ($1 eq "FAIL") {
$expass = 0;
} else {
die "Bail out! unknown expected result '$1' in $profile";
}
} elsif (/^#=TODO\s*/) {
$istodo = 1;
} elsif (/^#=DISABLED\s*/) {
$isdisabled = 1;
} else {
print PARSER if not $isdisabled;
}
}
my $result = close(PARSER);
if ($isdisabled) {
TODO: {
local $TODO = "Disabled testcase.";
ok(0, "TODO: $profile: $description");
}
} elsif ($istodo) {
TODO: {
local $TODO = "Unfixed testcase.";
ok($expass ? $result : !$result, "TODO: $profile: $description");
}
} else {
ok($expass ? $result : !$result, "$profile: $description");
}
}
opendir(DIR, $config{'profiledir'}) or die "Bail out! can't opendir $config{'profiledir'}: $!";
my @profiles = sort grep { /\.sd$/ && -f "$config{'profiledir'}/$_" } readdir(DIR);
closedir(DIR);
plan tests => scalar(@profiles);
foreach my $profile (@profiles) {
test_profile ("$config{'profiledir'}/$profile");
}

View File

@@ -1,4 +0,0 @@
#=DESCRIPTION Assign boolean non true/false value
#=EXRESULT FAIL
$VAR = beeblebrox

View File

@@ -1,5 +0,0 @@
#=DESCRIPTION test re-assignment of boolean
#=EXRESULT FAIL
$FOO = true
$FOO = false

View File

@@ -1,5 +0,0 @@
#=DESCRIPTION test re-assignment of boolean
#=EXRESULT FAIL
$FOO = true
$FOO = true

View File

@@ -1,5 +0,0 @@
#=DESCRIPTION test re-assignment of boolean
#=EXRESULT FAIL
$FOO = true
$FOO = True

View File

@@ -1,6 +0,0 @@
#=DESCRIPTION Boolean assignments inside policy should fail
#=EXRESULT FAIL
/bin/foo {
$BLAH = false
}

View File

@@ -1,5 +0,0 @@
# from condcod6.sd
#=DESCRIPTION initial part of word matches 'true'
#=EXRESULT FAIL
$FOO=truely

View File

@@ -1,5 +0,0 @@
# taken from cond8.sd
#=DESCRIPTION initial part of word matches 'true', with spaces
#=EXRESULT FAIL
$FOO = truely

View File

@@ -1,5 +0,0 @@
# taken from cond10.sd
#=DESCRIPTION boolean assignment of an integer
#=EXRESULT FAIL
$FOO=1

View File

@@ -1,12 +0,0 @@
#=DESCRIPTION Simple boolean assignment parsing test
#=EXRESULT PASS
$VAR = True
${BOOLEAN} = fALsE
$GUH = true
$HO_HUM=TRUE
$MEEP = true
/bin/foo {
#include <abstractions/base>
}

View File

@@ -1,134 +0,0 @@
#
# $Id:$
#=DESCRIPTION validate some uses of capabilties.
#=EXRESULT PASS
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist {
capability chown,
capability dac_override,
capability dac_read_search,
capability fowner,
capability fsetid,
capability kill,
capability setgid,
capability setuid,
capability setpcap,
capability linux_immutable,
capability net_bind_service,
capability net_broadcast,
capability net_admin,
capability net_raw,
capability ipc_lock,
capability ipc_owner,
capability sys_module,
capability sys_rawio,
capability sys_chroot,
capability sys_ptrace,
capability sys_pacct,
capability sys_admin,
capability sys_boot,
capability sys_nice,
capability sys_resource,
capability sys_time,
capability sys_tty_config,
capability mknod,
capability lease,
}
/does/not/exist2 {
^chown {
capability chown,
}
^dac_override {
capability dac_override,
}
^dac_read_search {
capability dac_read_search,
}
^fowner {
capability fowner,
}
^fsetid {
capability fsetid,
}
^kill {
capability kill,
}
^setgid {
capability setgid,
}
^setuid {
capability setuid,
}
^setpcap {
capability setpcap,
}
^linux_immutable {
capability linux_immutable,
}
^net_bind_service {
capability net_bind_service,
}
^net_broadcast {
capability net_broadcast,
}
^net_admin {
capability net_admin,
}
^net_raw {
capability net_raw,
}
^ipc_lock {
capability ipc_lock,
}
^ipc_owner {
capability ipc_owner,
}
^sys_module {
capability sys_module,
}
^sys_rawio {
capability sys_rawio,
}
^sys_chroot {
capability sys_chroot,
}
^sys_ptrace {
capability sys_ptrace,
}
^sys_pacct {
capability sys_pacct,
}
^sys_admin {
capability sys_admin,
}
^sys_boot {
capability sys_boot,
}
^sys_nice {
capability sys_nice,
}
^sys_resource {
capability sys_resource,
}
^sys_time {
capability sys_time,
}
^sys_tty_config {
capability sys_tty_config,
}
^mknod {
capability mknod,
}
^lease {
capability lease,
}
}
# Test for duplicates?
/does/not/exist3 {
capability mknod,
capability mknod,
}

View File

@@ -1,30 +0,0 @@
#
# $Id: change_hat_new_style1.sd 4325 2005-04-18 03:02:43Z steve $
#=DESCRIPTION Simple test of new-style hats
#=EXRESULT PASS
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist {
#include <abstractions/base>
# hat 1
^HAT1 {
/var/log/HAT1 rwl,
}
# hat 2
^HAT2 {
/var/log/HAT2 rwl,
}
# hat 3
^HAT3 {
/var/log/HAT3 rwl,
}
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}

View File

@@ -1,67 +0,0 @@
#
# $Id: change_hat_new_style2.sd 4344 2005-04-19 04:55:20Z steve $
#=DESCRIPTION Tests to verify multiple profiles can have the same hatname
#=EXRESULT PASS
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/HAT1 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
/HAT2 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
/HAT3 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
/does/not/exist1 {
#include <abstractions/base>
# hat 1
^/HAT1 {
/var/log/HAT1 rwl,
}
# hat 2
^/HAT2 {
/var/log/HAT2 rwl,
}
}
/does/not/exist2 {
#include <abstractions/base>
# hat 1
^/HAT1 {
/var/log/HAT1 rwl,
}
# hat 2
^/HAT2 {
/var/log/HAT2 rwl,
}
}
/does/not/exist3 {
#include <abstractions/base>
# hat 1
^/HAT1 {
/var/log/HAT1 rwl,
}
# hat 2
^/HAT3 {
/var/log/HAT2 rwl,
}
}

View File

@@ -1,28 +0,0 @@
#
# $Id: change_hat_old_style1.sd 5923 2005-12-14 18:49:16Z steve $
#=DESCRIPTION Simple test of old-style hats
#=EXRESULT FAIL
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
# hat 1
/does/not/exist^HAT1 {
/var/log/HAT1 rwl,
}
# hat 2
/does/not/exist^HAT2 {
/var/log/HAT2 rwl,
}
# hat 3
/does/not/exist^HAT3 {
/var/log/HAT3 rwl,
}

View File

@@ -1,38 +0,0 @@
#
# $Id: change_hat_old_style2.sd 5923 2005-12-14 18:49:16Z steve $
#=DESCRIPTION Simple test of old-style hats
#=EXRESULT FAIL
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
# hat
/does/not/exist^HAT {
/var/log/HAT rwl,
}
# hat 0
/does/not/exist^HAT0 {
/var/log/HAT0 rwl,
}
/does/not/exist {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
# hat 1
/does/not/exist^HAT1 {
/var/log/HAT1 rwl,
}
# hat 2
/does/not/exist^HAT2 {
/var/log/HAT2 rwl,
}
# hat 3
/does/not/exist^HAT3 {
/var/log/HAT3 rwl,
}

View File

@@ -1,29 +0,0 @@
#
# $Id: change_hat_old_style3.sd 5923 2005-12-14 18:49:16Z steve $
#=DESCRIPTION Simple test of old-style hats
#=EXRESULT FAIL
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
# hat
/does/not/exist^HAT {
/var/log/HAT rwl,
}
# hat 0
/does/not/exist^HAT0 {
/var/log/HAT0 rwl,
}
# hat 1
/does/not/exist^HAT1 {
/var/log/HAT1 rwl,
}
/does/not/exist {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}

View File

@@ -1,27 +0,0 @@
#=DESCRIPTION conditional else
#=EXRESULT PASS
$FOO=true
$FALSE = false
/bin/true {
^TRUE {
if $FOO {
/bin/true rix,
} else {
if $FALSE {
/bin/false rix,
}
}
}
^FALSE {
if not $FOO {
/bin/true rix,
} else {
if not ${FALSE} {
/bin/false rix,
}
}
}
}

View File

@@ -1,23 +0,0 @@
#=DESCRIPTION conditional else
#=EXRESULT PASS
$FOO=true
$FALSE = false
/bin/true {
^TRUE {
if $FOO {
/bin/true rix,
} else if $FALSE {
/bin/false rix,
}
}
^FALSE {
if not $FOO {
/bin/false rix,
} else if not ${FALSE} {
/bin/true rix,
}
}
}

View File

@@ -1,107 +0,0 @@
#=DESCRIPTION conditional else
#=EXRESULT PASS
$FOO=true
$BAR = false
$FALSE = false
/bin/true {
#empty clauses
if $FOO {
}
if $BAR {
}
if $FOO {
} else {
}
if $BAR {
} else {
}
if $FOO {
if $FALSE {
}
if not $FALSE {
} else {
}
} else {
if $BAR {
} else {
}
if $BAR {
} else if not $FALSE {
}
}
#unempty clauses
if $FOO {
/tmp/1 r,
}
if $BAR {
/tmp/2 r,
}
if $FOO {
/tmp/3 r,
} else {
/tmp/4 r,
}
if $BAR {
/tmp/5 r,
} else {
/tmp/6 r,
}
if $FOO {
/tmp/7 r,
if $FALSE {
/tmp/8 r,
}
if not $FALSE {
/tmp/9 r,
} else {
/tmp/10 r,
}
} else {
/tmp/11 r,
if $BAR {
/tmp/12 r,
} else {
/tmp/13 r,
}
if $BAR {
/tmp/14 r,
} else if not $FALSE {
/tmp/15 r,
}
}
if $BAR {
/tmp/16 r,
if $FALSE {
/tmp/17 r,
}
if not $FALSE {
/tmp/18 r,
} else {
/tmp/19 r,
}
} else {
/tmp/20 r,
if $BAR {
/tmp/21 r,
} else {
/tmp/22 r,
}
if $BAR {
/tmp/23 r,
} else if not $FALSE {
/tmp/24 r,
}
}
}

View File

@@ -1,21 +0,0 @@
#=DESCRIPTION conditional else in invlaid locations
#=EXRESULT FAIL
$BAR = false
$FOO=true
$FALSE = false
/bin/true {
^TRUE {
if $FOO {
/bin/true rix,
} else if $FALSE {
/bin/false rix,
} else if $BAR {
/dev/null r,
}
} else {
/dev/null w,
}
}

View File

@@ -1,46 +0,0 @@
#=DESCRIPTION conditional else
#=EXRESULT PASS
$FOO=true
$BAR = false
$FALSE = false
/bin/true {
^TRUE {
if $FOO {
/bin/true rix,
} else if $FALSE {
/bin/false rix,
} else if $BAR {
/dev/null r,
} else if not $FALSE {
/dev/null w,
} else if defined @B1 {
/tmp/1 rw,
} else if defined @B2 {
/tmp/2 rw,
} else if defined @B3 {
/tmp/3 rw,
} else {
/tmp/4 rw,
}
}
^FALSE {
if not $FOO {
/bin/false rix,
} else if ${FALSE} {
/bin/true rix,
} else if $BAR {
/dev/null r,
} else if defined @B1 {
/tmp/1 rw,
} else if defined @B2 {
/tmp/2 rw,
} else if defined @B3 {
/tmp/3 rw,
} else {
/tmp/4 rw,
}
}
}

View File

@@ -1,15 +0,0 @@
#=DESCRIPTION conditional else in invalid locations
#=EXRESULT FAIL
$BAR = false
$FOO=true
$FALSE = false
/bin/true {
if $FOO {
/bin/true rix,
}
} else if $FALSE {
/dev/null w,
}

View File

@@ -1,18 +0,0 @@
#=DESCRIPTION conditional else in invalid locations
#=EXRESULT FAIL
$BAR = false
$FOO=true
$FALSE = false
/bin/true {
if $FOO {
/bin/true rix,
^FOO {
/bin/false rix,
}
else if $FALSE {
/dev/null w,
}
}
}

View File

@@ -1,17 +0,0 @@
#=DESCRIPTION conditional else in invalid locations
#=EXRESULT FAIL
$BAR = false
$FOO=true
$FALSE = false
/bin/true {
if $FOO {
/bin/true rix,
} else ^FOO {
/bin/false rix,
}
if $FALSE {
/dev/null w,
}
}

View File

@@ -1,10 +0,0 @@
# taken from cond31.sd
#=DESCRIPTION boolean assigned inside profile scope
#=EXRESULT FAIL
/bin/true {
$BAR=true
if $BAR {
/bin/true rix,
}
}

View File

@@ -1,10 +0,0 @@
#=DESCRIPTION conditional around only mode
#=EXRESULT FAIL
$FOO=true
/bin/true {
/bin/true if $FOO {
r,
}
}

View File

@@ -1,10 +0,0 @@
#=DESCRIPTION conditional at end of line
#=EXRESULT FAIL
$FOO=true
/bin/true {
/bin/true r if $FOO {
,
}
}

View File

@@ -1,17 +0,0 @@
#=DESCRIPTION duplicated hats inside a conditional
#=EXRESULT FAIL
${FOO} = true
/bin/true {
^dupehat {
/bin/false rix,
}
if ${FOO} {
^dupehat {
capability dac_override,
}
}
}

View File

@@ -1,21 +0,0 @@
#=DESCRIPTION duplicated hats inside a conditional
#=EXRESULT FAIL
${FOO} = true
${BAR} = true
/bin/true {
if ${BAR} {
^dupehat {
/bin/false rix,
}
}
if ${FOO} {
^dupehat {
capability dac_override,
}
}
}

View File

@@ -1,14 +0,0 @@
#=DESCRIPTION Conditional tests with 'defined' keyword
#=EXRESULT PASS
@FOO = ""
/bin/true {
if defined @FOO {
/bin/true rix,
}
if defined @BAR {
/bin/false rix,
}
/dev/null r,
}

View File

@@ -1,20 +0,0 @@
#=DESCRIPTION Conditional tests with 'defined' keyword
#=EXRESULT PASS
@FOO = ""
/bin/true {
if not defined @BAR {
/bin/true rix,
}
if not defined @FOO {
/bin/false rix,
}
if not not defined @FOO {
/usr/bin/true rix,
}
if not not defined @BAR {
/usr/bin/false rix,
}
/dev/null r,
}

View File

@@ -1,21 +0,0 @@
# taken from cond50.sd
#=DESCRIPTION simple else clause
#=EXRESULT PASS
$FOO=true
/bin/true {
if $FOO {
/bin/true rix,
} else {
/bin/false rix,
}
}
/bin/false {
if not $FOO {
/bin/true rix,
} else {
/bin/false rix,
}
}

View File

@@ -1,26 +0,0 @@
# taken from cond52.sd
#=DESCRIPTION hat defined in if and else clauses
#=EXRESULT PASS
$FOO=true
/bin/true {
if $FOO {
^TRUE {
/bin/true rix,
}
} else {
^TRUE {
/bin/false rix,
}
}
if not $FOO {
^FALSE {
/bin/true rix,
}
} else {
^FALSE {
/bin/false rix,
}
}
}

View File

@@ -1,23 +0,0 @@
# taken from codn54.sd
#=DESCRIPTION conditional within hat scope
#=EXRESULT PASS
$FOO=true
/bin/true {
^TRUE {
if $FOO {
/bin/true rix,
} else {
/bin/false rix,
}
}
^FALSE {
if not $FOO {
/bin/true rix,
} else {
/bin/false rix,
}
}
}

View File

@@ -1,17 +0,0 @@
# taken from codn55.sd
#=DESCRIPTION improper nesting of hat and conditional block
#=EXRESULT FAIL
$FOO=true
# indentation screwy to try to best show 'else' in wrong place
/bin/true {
if $FOO {
^HAT {
/bin/true rix,
} else {
/bin/bother rix,
}
}
}

View File

@@ -1,18 +0,0 @@
# taken from cond59.sd
#=DESCRIPTION improper nesting of hat and conditional
#=EXRESULT FAIL
$FOO=true
#indentation screwy to try to show crossing levels
/bin/true {
/bin/true rix,
if $FOO {
^HATNAME
} #endif
{
/bin/false rix,
if $FOO {
} #endhat
} #endif
}

View File

@@ -1,10 +0,0 @@
#=DESCRIPTION conditional within profile
#=EXRESULT PASS
$FOO=true
/bin/true {
if $FOO {
/bin/true rix,
}
}

View File

@@ -1,12 +0,0 @@
# taken from cond48.sd
#=DESCRIPTION redundant rule selected by conditional
#=EXRESULT PASS
$FOO=true
/bin/true {
if $FOO {
/bin/true rix,
}
/bin/true rix,
}

View File

@@ -1,17 +0,0 @@
#=DESCRIPTION basic conditional statements w/file rules
#=EXRESULT PASS
$FOO=true
$BAR = False
/bin/true {
/bin/false rix,
if ${FOO} {
/bin/true rix,
}
/bin/true rix,
if ${BAR} {
/etc/shadow rw,
}
/bin/sh rix,
}

View File

@@ -1,20 +0,0 @@
#=DESCRIPTION basic conditional statements w/capabilities
#=EXRESULT PASS
$FOO=true
$BAR = False
/bin/true {
/bin/false rix,
capability net_raw,
if ${FOO} {
capability ipc_lock,
}
/bin/true rix,
if ${BAR} {
capability sys_admin,
/etc/shadow rw,
}
/bin/sh rix,
capability dac_override,
}

View File

@@ -1,29 +0,0 @@
#=DESCRIPTION basic conditional statements w/hats
#=EXRESULT PASS
$FOO=true
$BAR = False
/bin/true {
/bin/false rix,
capability net_raw,
if ${FOO} {
capability ipc_lock,
^hat1 {
/usr/bin/sendmail rix,
}
}
/bin/true rix,
if ${BAR} {
capability sys_admin,
/etc/shadow rw,
^hat2 {
/usr/bin/passwd rix,
}
}
/bin/sh rix,
capability dac_override,
^hat3 {
/tmp/** rw,
}
}

View File

@@ -1,32 +0,0 @@
#=DESCRIPTION basic conditional statements w/hats
#=EXRESULT PASS
$FOO=true
$BAR = False
/bin/true {
/bin/false rix,
capability net_raw,
if ${FOO} {
capability ipc_lock,
^hat1 {
/usr/bin/sendmail rix,
if not $BAR {
/usr/sbin/sshd rix,
}
}
}
/bin/true rix,
if ${BAR} {
capability sys_admin,
/etc/shadow rw,
^hat2 {
/usr/bin/passwd rix,
}
}
/bin/sh rix,
capability dac_override,
^hat3 {
/tmp/** rw,
}
}

View File

@@ -1,23 +0,0 @@
#=DESCRIPTION basic conditional statements w/hats
#=EXRESULT PASS
$FOO=true
$BAR = False
/bin/true {
/bin/false rix,
capability net_raw,
if ${FOO} {
^hat1 {
/usr/bin/sendmail rix,
}
}
if not ${FOO} {
^hat1 {
/usr/bin/sendmail rux,
}
}
/bin/true rix,
/bin/sh rix,
capability dac_override,
}

View File

@@ -1,21 +0,0 @@
#=DESCRIPTION basic conditional statements w/hats
#=EXRESULT PASS
$FOO= false
$BAR = False
/bin/true {
/bin/false rix,
capability net_raw,
^hat1 {
/usr/bin/sendmail rix,
}
if ${FOO} {
^hat1 {
/usr/bin/sendmail rux,
}
}
/bin/true rix,
/bin/sh rix,
capability dac_override,
}

View File

@@ -1,30 +0,0 @@
#=DESCRIPTION basic conditional with not statements/weird whitespace
#=EXRESULT PASS
$FOO=true
$BAR = False
/bin/true {
/bin/false rix,
capability net_raw,
if not not not not not
not not not not not
not not not not not
not not not not not
not
not
not
not
not
not
${FOO}
{
/usr/bin/sendmail
rux,
}
/bin/true rix,
/bin/sh rix,
capability dac_override,
}

View File

@@ -1,306 +0,0 @@
#=DESCRIPTON simple stress test nested ifs
#=EXRESULT PASS
$a1 = true
$a2 = true
$a3 = true
$a4 = true
$a5 = true
$a6 = true
$a7 = true
$a8 = true
$a9 = true
$a10 = true
$a11 = true
$a12 = true
$a13 = true
$a14 = true
$a15 = true
$a16 = true
$a17 = true
$a18 = true
$a19 = true
$a20 = true
$a21 = true
$a22 = true
$a23 = true
$a24 = true
$a25 = true
$a26 = true
$a27 = true
$a28 = true
$a29 = true
$a30 = true
$a31 = true
$a32 = true
$a33 = true
$a34 = true
$a35 = true
$a36 = true
$a37 = true
$a38 = true
$a39 = true
$a40 = true
$a41 = true
$a42 = true
$a43 = true
$a44 = true
$a45 = true
$a46 = true
$a47 = true
$a48 = true
$a49 = true
$a50 = true
$a51 = true
$a52 = true
$a53 = true
$a54 = true
$a55 = true
$a56 = true
$a57 = true
$a58 = true
$a59 = true
$a60 = true
$a61 = true
$a62 = true
$a63 = true
$a64 = true
$a65 = true
$a66 = true
$a67 = true
$a68 = true
$a69 = true
$a70 = true
$a71 = true
$a72 = true
$a73 = true
$a74 = true
$a75 = true
$a76 = true
$a77 = true
$a78 = true
$a79 = true
$a80 = true
$a81 = true
$a82 = true
$a83 = true
$a84 = true
$a85 = true
$a86 = true
$a87 = true
$a88 = true
$a89 = true
$a90 = true
$a91 = true
$a92 = true
$a93 = true
$a94 = true
$a95 = true
$a96 = true
$a97 = true
$a98 = true
$a99 = true
$a100 = true
/bin/true {
/bin/true r,
if $a1 {
if $a2 {
if $a3 {
if $a4 {
if $a5 {
if $a6 {
if $a7 {
if $a8 {
if $a9 {
if $a10 {
if $a11 {
if $a12 {
if $a13 {
if $a14 {
if $a15 {
if $a16 {
if $a17 {
if $a18 {
if $a19 {
if $a20 {
if $a21 {
if $a22 {
if $a23 {
if $a24 {
if $a25 {
if $a26 {
if $a27 {
if $a28 {
if $a29 {
if $a30 {
if $a31 {
if $a32 {
if $a33 {
if $a34 {
if $a35 {
if $a36 {
if $a37 {
if $a38 {
if $a39 {
if $a40 {
if $a41 {
if $a42 {
if $a43 {
if $a44 {
if $a45 {
if $a46 {
if $a47 {
if $a48 {
if $a49 {
if $a50 {
if $a51 {
if $a52 {
if $a53 {
if $a54 {
if $a55 {
if $a56 {
if $a57 {
if $a58 {
if $a59 {
if $a60 {
if $a61 {
if $a62 {
if $a63 {
if $a64 {
if $a65 {
if $a66 {
if $a67 {
if $a68 {
if $a69 {
if $a70 {
if $a71 {
if $a72 {
if $a73 {
if $a74 {
if $a75 {
if $a76 {
if $a77 {
if $a78 {
if $a79 {
if $a80 {
if $a81 {
if $a82 {
if $a83 {
if $a84 {
if $a85 {
if $a86 {
if $a87 {
if $a88 {
if $a89 {
if $a90 {
if $a91 {
if $a92 {
if $a93 {
if $a94 {
if $a95 {
if $a96 {
if $a97 {
if $a98 {
if $a99 {
if $a100 {
/bin/false ux,
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}

View File

@@ -1,47 +0,0 @@
# vim:syntax=subdomain
# Last Modified: Wed Aug 31 11:14:09 2005
#=DESCRIPTION dos line endings
#=EXRESULT PASS
/usr/lib/RealPlayer10/realplay {
#include <abstractions/base>
#include <abstractions/bash>
#include <abstractions/consoles>
#include <abstractions/fonts>
#include <abstractions/kde>
#include <abstractions/nameservice>
#include <abstractions/gnome>
#include <abstractions/user-download>
/bin/bash ix,
/bin/sed ixr,
/bin/true ixr,
/etc/opt/gnome/pango/pango.modules r,
/opt/gnome/lib/gtk-2.0/2.4.0/loaders/* r,
/opt/gnome/lib/lib*so* r,
/opt/gnome/lib/pango/1.4.0/modules/* r,
/opt/gnome/share/icons r,
/opt/gnome/share/icons/** r,
/opt/gnome/bin/nautilus rux,
/root r,
/root/.Xauthority r,
/root/.fonts.cache-1 r,
/root/.realplayerrc rw,
/home/*/ r,
/home/*/.Xauthority r,
/home/*/.fonts.cache-1 r,
/home/*/.realplayerrc rw,
/usr/X11R6/lib/Acrobat7/Resource/Font/* r,
/usr/X11R6/lib/Acrobat7/Resource/Font/PFM/* r,
/usr/lib/RealPlayer10/** r,
/usr/lib/RealPlayer10/realplay.bin ixr,
/usr/lib/jvm/java-1.4.2-sun-1.4.2.06/jre/lib/fonts/** r,
/usr/lib/ooo-2.0/share/fonts/** r,
/opt/MozillaFirefox/bin/firefox.sh pxr,
/opt/MozillaFirefox/lib/firefox-bin pxr,
/opt/MozillaFirefox/lib/init.d r,
/usr/bin/opera pxr,
/usr/share/icons r,
/usr/share/icons/** r,
/opt/gnome/share/pixmaps r,
/opt/gnome/share/pixmaps/** r,
}

View File

@@ -1,39 +0,0 @@
#
# $Id: flags_bad.sd 4374 2005-04-22 06:14:42Z steve $
#=DESCRIPTION Ensure debug flag is no longer accepted
#=EXRESULT FAIL
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist flags=(debug) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist r,
}
/does/not/exist2 flags=(audit,debug) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist2 r,
}
/does/not/exist3 flags=(debug,complain) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist5 r,
}
/does/not/exist4 flags=(audit,complain) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist7 r,
^debug flags=(debug) {
/var/log/debug rwl,
}
}

View File

@@ -1,13 +0,0 @@
#
# $Id: flags_bad2.sd 5662 2005-11-07 09:55:28Z steve $
#=DESCRIPTION Don't accept other keyword as a flag
#=EXRESULT FAIL
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist flags=(capability) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist r,
}

View File

@@ -1,19 +0,0 @@
#
# $Id: flags_bad3.sd 5662 2005-11-07 09:55:28Z steve $
#=DESCRIPTION Ensure really bad parsing fails
#=EXRESULT FAIL
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist flags=(blahblab {
/usr/X11R6/lib/lib*so* r
/does/not/exist r
}
audit) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist2 r,
}

View File

@@ -1,14 +0,0 @@
#
# $Id: flags_bad4.sd 5662 2005-11-07 09:55:28Z steve $
#=DESCRIPTION Bad flags parsing should fail
#=EXRESULT FAIL
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist flags=({{{ }} { } { } audit
{{}}}{{{} {}{}{} / ^ ) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist r,
}

View File

@@ -1,121 +0,0 @@
#
# $Id: flags_ok.sd 4372 2005-04-22 03:44:02Z steve $
#=DESCRIPTION validate some uses of the profile flags with hats.
#=EXRESULT PASS
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist flags=(complain) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist r,
^FOO {
#include <abstractions/base>
}
}
/does/not/exist2 flags=(complain) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist2 r,
^FOO flags=(complain) {
#include <abstractions/base>
}
}
/does/not/exist3 flags=(complain) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist3 r,
^FOO flags=(audit) {
#include <abstractions/base>
}
}
/does/not/exist4 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist4 r,
^FOO flags=(complain) {
#include <abstractions/base>
}
}
/does/not/exist5 flags=(audit) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist5 r,
^FOO {
#include <abstractions/base>
}
}
/does/not/exist6 flags=(audit) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist6 r,
^FOO flags=(audit) {
#include <abstractions/base>
}
}
/does/not/exist7 flags=(audit) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist7 r,
^FOO flags=(complain) {
#include <abstractions/base>
}
}
/does/not/exist8 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist8 r,
^FOO flags=(audit) {
#include <abstractions/base>
}
}
/does/not/exist9 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist9 r,
^FOO flags=(audit) {
#include <abstractions/base>
}
^BAR {
#include <program-chunks/base-files>
}
^BAZ flags=(audit) {
#include <program-chunks/base-files>
}
^BIF flags=(complain) {
#include <abstractions/base>
}
^BUZ flags=(complain,audit) {
/var/log/messages r,
}
}

View File

@@ -1,41 +0,0 @@
#
# $Id: flags_ok.sd 4372 2005-04-22 03:44:02Z steve $
#=DESCRIPTION validate some uses of the profile flags.
#=EXRESULT PASS
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist flags=(complain) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist r,
}
/does/not/exist2 flags=(audit) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist2 r,
}
/does/not/exist3 flags=(complain,audit) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist5 r,
}
/does/not/exist4 flags=(audit,complain) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist7 r,
}
/does/not/exist5 flags=(audit,complain,audit) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist8 r,
}

View File

@@ -1,27 +0,0 @@
#
# $Id: flags_ok_whitespace.sd 5669 2005-11-08 08:22:57Z steve $
#=DESCRIPTION verify whitespace is allowed in profile flags.
#=EXRESULT PASS
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist3 flags=(complain, audit) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist5 r,
}
/does/not/exist4 flags = (audit , complain){
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist7 r,
}
/does/not/exist5 flags = ( audit , complain , audit ) {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist8 r,
}

View File

@@ -1,7 +0,0 @@
#
#=DESCRIPTION includes testing - non-existent include should fail
#=EXRESULT FAIL
#
/does/not/exist {
#include <does-not-exist/does-not-exist>
}

View File

@@ -1,7 +0,0 @@
#
#=DESCRIPTION includes testing - mis-parsing include should fail
#=EXRESULT FAIL
#
/does/not/exist {
#include does-not-exist/does-not-exist
}

View File

@@ -1,8 +0,0 @@
#
#=DESCRIPTION includes testing - non-existent include should fail
#=EXRESULT FAIL
#
/does/not/exist {
#include <does-not-exist/does-not-exist>
#include <abstractions/base>
}

View File

@@ -1,8 +0,0 @@
#
#=DESCRIPTION includes testing - non-existent include should fail
#=EXRESULT FAIL
#
/does/not/exist {
#include <abstractions/base>
#include <does-not-exist/does-not-exist>
}

View File

@@ -1,9 +0,0 @@
#
#=DESCRIPTION includes testing - basic include of global and local include
#=EXRESULT PASS
#
/does/not/exist {
#include <abstractions/base>
#include <includes_okay_helper.include>
#include <abstractions/base>
}

View File

@@ -1,6 +0,0 @@
#
#=DESCRIPTION A helper for includes_okay.sd
#
#include <abstractions/nameservice>
/tmp/** r,

View File

@@ -1,7 +0,0 @@
#
#=DESCRIPTION includes testing - recursive include should fail
#=EXRESULT FAIL
#
/does/not/exist {
#include <includes_recursive.sd>
}

View File

@@ -1,19 +0,0 @@
#
# $Id: flags_ok.sd 4342 2005-04-18 22:21:03Z steve $
#=DESCRIPTION Basic parsing test, duplicate mode bits
#=EXRESULT PASS
# vim:syntax=subdomain
# Last Modified: Sun Apr 17 19:44:44 2005
#
/does/not/exist {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* rRr,
/does/not/exist r,
/var/log/messages wWw,
/tmp/sd*.foo rwRWwrlL,
/bin/cat PxpxpXPXpx,
/bin/ls iXIXIxIX,
/bin/echo uXUXuxUxuX,
}

View File

@@ -1,25 +0,0 @@
#
# $Id$
#=DESCRIPTION dupe profiles
#=EXRESULT FAIL
#
/does/not/exist {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
/does/not/exist2 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
/does/not/exist2 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist r,
}

View File

@@ -1,40 +0,0 @@
#
# $Id$
#=DESCRIPTION dupe profiles
#=EXRESULT FAIL
#
/does/not/exist1 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
/does/not/exist2 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
/does/not/exist {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
/does/not/exist2 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist r,
}
/does/not/exist3 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}

View File

@@ -1,42 +0,0 @@
#
# $Id$
#=DESCRIPTION dupe hats in profile
#=EXRESULT FAIL
#
/does/not/exist {
^does/not/exist1 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
^does/not/exist2 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
^does/not/exist3 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
^does/not/exist2 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/does/not/exist r,
}
^does/not/exist4 {
#include <abstractions/base>
/usr/X11R6/lib/lib*so* r,
/usr/bin/emacs r,
}
}

View File

@@ -1,6 +0,0 @@
#=DESCRIPTION Simple test case for embedded spaces
#=EXRESULT FAIL
/bin/foo {
/abc\ def r,
}

View File

@@ -1,10 +0,0 @@
#
#=DESCRIPTION A simple syntax error -- missing hatname + bad parsing
#=EXRESULT FAIL
#
/usr/bin/foo^!!!!!!!!!^BLAH {
/blah rw,
}
/usr/bin/foo {
}

View File

@@ -1,9 +0,0 @@
#
#=DESCRIPTION Require px, ix, or ux, not bare x.
#=EXRESULT FAIL
#
/usr/bin/foo {
#include <abstractions/files>
/bin/ls rx,
}

View File

@@ -1,8 +0,0 @@
#
#=DESCRIPTION A simple syntax error -- no closing brace
#=EXRESULT FAIL
#
/usr/bin/foo {
/usr/bin/foo r,
/blah rw,

View File

@@ -1,14 +0,0 @@
#
#=DESCRIPTION A simple syntax error -- no closing brace with hat.
#=EXRESULT FAIL
#
/usr/bin/foo {
/usr/bin/foo r,
/blah rw,
^hat1 {
/foo rw,
}
/var/log/messages w,

View File

@@ -1,14 +0,0 @@
#
#=DESCRIPTION A simple syntax error -- no closing brace with hat.
#=EXRESULT FAIL
#
/usr/bin/foo {
/usr/bin/foo r,
/blah rw,
^hat1 {
/foo rw,
/var/log/messages w,
}

View File

@@ -1,17 +0,0 @@
#
#=DESCRIPTION A simple syntax error -- no closing brace with hat.
#=EXRESULT FAIL
#
/usr/bin/foo {
/usr/bin/foo r,
/blah rw,
^hat1 {
/foo rw,
^hat2 {
/bar rw,
}
/var/log/messages w,
}

View File

@@ -1,8 +0,0 @@
#
#=DESCRIPTION A simple syntax error -- no opening brace
#=EXRESULT FAIL
#
/usr/bin/foo
/usr/bin/foo r,
/blah rw,
}

View File

@@ -1,9 +0,0 @@
#
#=DESCRIPTION A simple syntax error -- no program
#=EXRESULT FAIL
#
{
/usr/bin/foo r,
/blah rw,
}

View File

@@ -1,9 +0,0 @@
#
#=DESCRIPTION A simple syntax error
#=EXRESULT FAIL
#
/usr/bin/foo {
/usr/bin/foo r,
blah,
}

View File

@@ -1,6 +0,0 @@
#=DESCRIPTION Simple test case for embedded spaces
#=EXRESULT PASS
/bin/foo {
"/abc\ def" r,
}

View File

@@ -1,6 +0,0 @@
#=DESCRIPTION Simple test case for embedded spaces
#=EXRESULT PASS
/bin/foo {
"/abc def" r,
}

View File

@@ -1,6 +0,0 @@
#=DESCRIPTION Simple test case for embedded spaces
#=EXRESULT PASS
"/bin/fo o" {
"/abc def" r,
}

View File

@@ -1,14 +0,0 @@
#
#=DESCRIPTION simple syntax test -- no actual rules.
#=EXRESULT PASS
#
/does/not/exist {
}
/does/not/exist2 {
^hat1 {
}
^hat2 {
}
}

View File

@@ -1,13 +0,0 @@
#
# $Id: tcp_client_error1.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain bad via interface parsing
#=EXRESULT FAIL
#
/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,
}

View File

@@ -1,13 +0,0 @@
#
# $Id: tcp_client_error1.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp connect w/multiple to destinations
#=EXRESULT FAIL
#
/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,
}

View File

@@ -1,12 +0,0 @@
#
# $Id: tcp_client_error2.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp connect w/multiple from statments
#=EXRESULT FAIL
/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,
}

View File

@@ -1,13 +0,0 @@
#
# $Id: tcp_client_error3.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp_connect w/bad ip address
#=EXRESULT FAIL
#
/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,
}

View File

@@ -1,13 +0,0 @@
#
# $Id: tcp_client_error4.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp connect w/bad netmask
#=EXRESULT FAIL
#
/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,
}

View File

@@ -1,13 +0,0 @@
#
# $Id: tcp_client_error5.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp connect w/bad portnumber
#=EXRESULT FAIL
#
/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,
}

View File

@@ -1,13 +0,0 @@
#
# $Id: tcp_client_error6.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp connect w/bad CIDR netmask
#=EXRESULT FAIL
#
/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,
}

View File

@@ -1,13 +0,0 @@
#
# $Id: tcp_client_error7.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp connect w/portnumber 65536
#=EXRESULT FAIL
#
/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:65536,
/lib/libc.so.6 r,
/lib/ld-linux.so.2 r,
/etc/ld.so.cache r,
/lib/libc-2.1.3.so r,
}

View File

@@ -1,13 +0,0 @@
#
# $Id: tcp_client_ok1.sd 4323 2005-04-18 02:06:39Z steve $
#=DESCRIPTION netdomain tcp connect simple parse test (to,via)
#=EXRESULT PASS
#
/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,
}

View File

@@ -1,12 +0,0 @@
#
# $Id: tcp_client_ok2.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp connect to ip/cidr netmask/port range via
#=EXRESULT PASS
/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,
}

View File

@@ -1,11 +0,0 @@
#
# $Id: tcp_client_ok3.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp connect to,from,via
/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,
}

View File

@@ -1,24 +0,0 @@
#
# $Id: tcp_client_ok4.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain tcp (accept,connect), udp (send,receive) conglomerate test
#=EXRESULT PASS
#
/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,
}

View File

@@ -1,14 +0,0 @@
#
# $Id: tcp_client_ok5.sd 4316 2005-04-17 20:42:35Z steve $
#=DESCRIPTION netdomain connect to port 65535
#=EXRESULT PASS
#
/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,
}

View File

@@ -1,13 +0,0 @@
#
# $Id: tcp_server_ok1.sd 4324 2005-04-18 02:17:26Z steve $
#=DESCRIPTION netdomain tcp accept simple parse test (from,via)
#=EXRESULT PASS
#
/tmp/tcp/tcp_server {
tcp_accept from 127.0.0.1,
tcp_accept from 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,
}

View File

@@ -1,12 +0,0 @@
#
# $Id: tcp_server_ok2.sd 4324 2005-04-18 02:17:26Z steve $
#=DESCRIPTION netdomain tcp accept from ip/cidr netmask/port range via
#=EXRESULT PASS
/tmp/tcp/tcp_server {
tcp_accept from 10.0.0.17/16:50-100 via eth1,
tcp_accept from 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,
}

View File

@@ -1,11 +0,0 @@
#
# $Id: tcp_server_ok3.sd 4324 2005-04-18 02:17:26Z steve $
#=DESCRIPTION netdomain tcp accept from,to,via
/tmp/tcp/tcp_server {
tcp_accept from 10.0.0.17/16:50-100 to 127.0.0.1 via eth1,
tcp_accept from 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,
}

View File

@@ -1,14 +0,0 @@
#
# $Id: tcp_server_ok4.sd 4324 2005-04-18 02:17:26Z steve $
#=DESCRIPTION netdomain accept from port 65535
#=EXRESULT PASS
#
/tmp/tcp/tcp_client {
tcp_accept to 10.0.0.17/16:1024-65535 from 127.0.0.1 via eth1,
tcp_accept to 10.0.0.18/16:65535 from 127.0.0.1 via eth1,
tcp_accept 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,
}

View File

@@ -1,6 +0,0 @@
#
##
/usr/bin/foo {
/usr/bin/foo r,
}

View File

@@ -1,9 +0,0 @@
#
#=DESCRIPTION A simple successful profile
#=EXRESULT PASS
#
/usr/bin/foo {
/usr/bin/foo r,
/usr/bin/blah rix,
}

Some files were not shown because too many files have changed in this diff Show More