very simple regression test for systrace; okay atatat@
This commit is contained in:
parent
2fa2a4a234
commit
76df85d406
|
@ -0,0 +1,5 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 2003/03/26 04:14:16 provos Exp $
|
||||
|
||||
SUBDIR+= id
|
||||
|
||||
.include <bsd.subdir.mk>
|
|
@ -0,0 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 2003/03/26 04:14:16 provos Exp $
|
||||
|
||||
NOMAN= # defined
|
||||
|
||||
regress:
|
||||
@ksh ${.CURDIR}/id.sh ${.CURDIR}/id.policy
|
||||
|
||||
.include <bsd.prog.mk>
|
|
@ -0,0 +1,26 @@
|
|||
Policy: /usr/bin/id, Emulation: netbsd
|
||||
netbsd-mmap: permit
|
||||
netbsd-fsread: filename eq "/etc/ld.so.conf" then permit
|
||||
netbsd-__fstat13: permit
|
||||
netbsd-close: permit
|
||||
netbsd-munmap: permit
|
||||
netbsd-fsread: filename match "/usr/pkg/lib/libc.so.*" then permit
|
||||
netbsd-fsread: filename match "/lib/libc.so.*" then permit
|
||||
netbsd-__sysctl: permit
|
||||
netbsd-fsread: filename eq "/etc/malloc.conf" then permit
|
||||
netbsd-break: permit
|
||||
netbsd-getuid: permit
|
||||
netbsd-ioctl: permit
|
||||
netbsd-fsread: filename eq "/etc/nsswitch.conf" then permit
|
||||
netbsd-read: permit
|
||||
netbsd-geteuid: permit
|
||||
netbsd-fsread: filename eq "/etc/pwd.db" then permit
|
||||
netbsd-fcntl: permit
|
||||
netbsd-pread: permit
|
||||
netbsd-getgid: permit
|
||||
netbsd-fsread: filename eq "/etc/group" then permit
|
||||
netbsd-getegid: permit
|
||||
netbsd-getgroups: permit
|
||||
netbsd-write: permit
|
||||
netbsd-exit: permit
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/ksh
|
||||
echo "/bin/systrace -f $1 -a /usr/bin/id"
|
||||
SYSTR_RES=`eval /bin/systrace -f $1 -a /usr/bin/id 2>/dev/null`
|
||||
NORM_RES=`/usr/bin/id`
|
||||
if [ -z "$SYSTR_RES" ] ; then
|
||||
rm -f id.core
|
||||
echo "Systrace of /usr/bin/id failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$NORM_RES" != "$SYSTR_RES" ] ; then
|
||||
echo "Expected \"$NORM_RES\""
|
||||
echo "Got \"$SYSTR_RES\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue