diff options
Diffstat (limited to 'contrib/netbsd-tests/usr.bin/sdiff')
27 files changed, 1689 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_dot.in b/contrib/netbsd-tests/usr.bin/sdiff/d_dot.in new file mode 100644 index 0000000..9c558e3 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_dot.in @@ -0,0 +1 @@ +. diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_flags_l.out b/contrib/netbsd-tests/usr.bin/sdiff/d_flags_l.out new file mode 100644 index 0000000..c7afce0 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_flags_l.out @@ -0,0 +1,102 @@ +Policy: /usr/bin/lynx, Emulation: native + > native-issetugid: permit + > native-mprotect: permit + > native-mmap: permit + native-__sysctl: permit + > native-fsread: filename eq "/var/run/ld.so.hints" then perm + > native-fstat: permit + native-close: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then perm | native-fsread: filename match "/usr/lib/libssl.so.*" then p + native-connect: sockaddr match "inet-\\\[*\\\]:80" then per | native-read: permit + native-exit: permit | native-fsread: filename match "/usr/lib/libcrypto.so.*" the + native-fcntl: cmd eq "F_SETFD" then permit | native-fsread: filename match "/usr/lib/libncurses.so.*" th + native-fsread: filename eq "/" then permit | native-fsread: filename match "/usr/lib/libc.so.*" then per + native-fsread: filename match "/<non-existent filename>: *" | native-munmap: permit + native-fsread: filename eq "/etc/lynx.cfg" then permit | native-sigprocmask: permit + native-fsread: filename eq "/etc/malloc.conf" then permit + native-fsread: filename eq "/etc/resolv.conf" then permit | native-getpid: permit + native-fsread: filename eq "/etc/utmp" then permit < + native-fsread: filename eq "/home" then permit < + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then permi < + native-fsread: filename eq "$HOME/.lynxrc" then permit < + native-fsread: filename eq "$HOME/.mailcap" then permit < + native-fsread: filename eq "$HOME/.mime.types" then permit < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-fsread: filename eq "$HOME/.terminfo.db" then permit < + native-fsread: filename eq "/obj" then permit < + native-fsread: filename eq "/tmp" then permit + > native-fswrite: filename match "/tmp/lynx-*" then permit + native-fsread: filename match "/tmp/lynx-*/." then permit + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "/etc/lynx.cfg" then permit + > native-fsread: filename eq "/" then permit + > native-fsread: filename eq "/usr/obj/bin/systrace/." then p + > native-fsread: filename eq "/usr/obj/bin" then permit + > native-fcntl: permit + > native-getdirentries: permit + > native-lseek: permit + > native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then per < + native-fsread: filename match "/usr/lib/libcrypto.so.*" the < + native-fsread: filename match "/usr/lib/libncurses.so.*" th < + native-fsread: filename match "/usr/lib/libssl.so.*" then p < + native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename eq "/usr/local" then permit + native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/usr/obj" then permit | native-fsread: filename eq "/home" then permit + native-fsread: filename eq "/usr/obj/bin" then permit | native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." then p | native-fsread: filename eq "$HOME/.lynxrc" then permit + > native-fsread: filename match "/<non-existent filename>: *" + native-fsread: filename eq "/usr/obj/bin/systrace/.mailcap" + > native-fsread: filename eq "$HOME/.mailcap" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.typ + > native-fsread: filename eq "$HOME/.mime.types" then permit + > native-sigaction: permit + > native-ioctl: permit + > native-fsread: filename eq "$HOME/.terminfo.db" then permit + > native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "/usr/share/misc/terminfo.db" th + > native-pread: permit + > native-write: permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then permi + native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/var/run/ld.so.hints" then perm | native-fsread: filename eq "/etc/utmp" then permit + native-fstat: permit < + native-fswrite: filename match "/tmp/lynx-*" then permit < + native-getdirentries: permit < + native-getpid: permit < + native-gettimeofday: permit < + native-ioctl: permit < + native-issetugid: permit < + native-lseek: permit < + native-mmap: permit < + native-mprotect: prot eq "PROT_READ" then permit < + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permit < + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then permit < + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" t < + native-munmap: permit < + native-nanosleep: permit < + native-poll: permit + native-pread: permit | native-nanosleep: permit + native-read: permit | native-gettimeofday: permit + native-recvfrom: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + native-select: permit < + native-sendto: true then permit < + native-sigaction: permit < + native-sigprocmask: permit < + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_D + > native-connect: sockaddr eq "inet-[127.0.0.1]:53" then perm + > native-sendto: true then permit + > native-select: permit + > native-recvfrom: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_S + native-write: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then per + > native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_flags_s.out b/contrib/netbsd-tests/usr.bin/sdiff/d_flags_s.out new file mode 100644 index 0000000..19179fe --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_flags_s.out @@ -0,0 +1,79 @@ + > native-issetugid: permit + > native-mprotect: permit + > native-mmap: permit + > native-fsread: filename eq "/var/run/ld.so.hints" then perm + > native-fstat: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then perm | native-fsread: filename match "/usr/lib/libssl.so.*" then p + native-connect: sockaddr match "inet-\\\[*\\\]:80" then per | native-read: permit + native-exit: permit | native-fsread: filename match "/usr/lib/libcrypto.so.*" the + native-fcntl: cmd eq "F_SETFD" then permit | native-fsread: filename match "/usr/lib/libncurses.so.*" th + native-fsread: filename eq "/" then permit | native-fsread: filename match "/usr/lib/libc.so.*" then per + native-fsread: filename match "/<non-existent filename>: *" | native-munmap: permit + native-fsread: filename eq "/etc/lynx.cfg" then permit | native-sigprocmask: permit + native-fsread: filename eq "/etc/resolv.conf" then permit | native-getpid: permit + native-fsread: filename eq "/etc/utmp" then permit < + native-fsread: filename eq "/home" then permit < + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then permi < + native-fsread: filename eq "$HOME/.lynxrc" then permit < + native-fsread: filename eq "$HOME/.mailcap" then permit < + native-fsread: filename eq "$HOME/.mime.types" then permit < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-fsread: filename eq "$HOME/.terminfo.db" then permit < + native-fsread: filename eq "/obj" then permit < + > native-fswrite: filename match "/tmp/lynx-*" then permit + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "/etc/lynx.cfg" then permit + > native-fsread: filename eq "/" then permit + > native-fsread: filename eq "/usr/obj/bin/systrace/." then p + > native-fsread: filename eq "/usr/obj/bin" then permit + > native-fcntl: permit + > native-getdirentries: permit + > native-lseek: permit + > native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then per < + native-fsread: filename match "/usr/lib/libcrypto.so.*" the < + native-fsread: filename match "/usr/lib/libncurses.so.*" th < + native-fsread: filename match "/usr/lib/libssl.so.*" then p < + native-fsread: filename eq "/usr/obj" then permit | native-fsread: filename eq "/home" then permit + native-fsread: filename eq "/usr/obj/bin" then permit | native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." then p | native-fsread: filename eq "$HOME/.lynxrc" then permit + > native-fsread: filename match "/<non-existent filename>: *" + > native-fsread: filename eq "$HOME/.mailcap" then permit + > native-fsread: filename eq "$HOME/.mime.types" then permit + > native-sigaction: permit + > native-ioctl: permit + > native-fsread: filename eq "$HOME/.terminfo.db" then permit + > native-fsread: filename eq "$HOME/.terminfo" then permit + > native-pread: permit + > native-write: permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then permi + native-fsread: filename eq "/var/run/ld.so.hints" then perm | native-fsread: filename eq "/etc/utmp" then permit + native-fstat: permit < + native-fswrite: filename match "/tmp/lynx-*" then permit < + native-getdirentries: permit < + native-getpid: permit < + native-gettimeofday: permit < + native-ioctl: permit < + native-issetugid: permit < + native-lseek: permit < + native-mmap: permit < + native-mprotect: prot eq "PROT_READ" then permit < + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permit < + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then permit < + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" t < + native-munmap: permit < + native-nanosleep: permit < + native-pread: permit | native-nanosleep: permit + native-read: permit | native-gettimeofday: permit + native-recvfrom: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + native-select: permit < + native-sendto: true then permit < + native-sigaction: permit < + native-sigprocmask: permit < + > native-connect: sockaddr eq "inet-[127.0.0.1]:53" then perm + > native-sendto: true then permit + > native-select: permit + > native-recvfrom: permit + native-write: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then per + > native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_flags_w.out b/contrib/netbsd-tests/usr.bin/sdiff/d_flags_w.out new file mode 100644 index 0000000..19ea79b --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_flags_w.out @@ -0,0 +1,102 @@ +Policy: /usr/bin/lynx, Emulation: native Policy: /usr/bin/lynx, Emulation: native + > native-issetugid: permit + > native-mprotect: permit + > native-mmap: permit + native-__sysctl: permit native-__sysctl: permit + > native-fsread: filename eq "/var/run/ld.so.hints" then pe + > native-fstat: permit + native-close: permit native-close: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe | native-fsread: filename match "/usr/lib/libssl.so.*" then + native-connect: sockaddr match "inet-\\\[*\\\]:80" then p | native-read: permit + native-exit: permit | native-fsread: filename match "/usr/lib/libcrypto.so.*" t + native-fcntl: cmd eq "F_SETFD" then permit | native-fsread: filename match "/usr/lib/libncurses.so.*" + native-fsread: filename eq "/" then permit | native-fsread: filename match "/usr/lib/libc.so.*" then p + native-fsread: filename match "/<non-existent filename>: | native-munmap: permit + native-fsread: filename eq "/etc/lynx.cfg" then permit | native-sigprocmask: permit + native-fsread: filename eq "/etc/malloc.conf" then permit native-fsread: filename eq "/etc/malloc.conf" then permit + native-fsread: filename eq "/etc/resolv.conf" then permit | native-getpid: permit + native-fsread: filename eq "/etc/utmp" then permit < + native-fsread: filename eq "/home" then permit < + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then per < + native-fsread: filename eq "$HOME/.lynxrc" then permit < + native-fsread: filename eq "$HOME/.mailcap" then permit < + native-fsread: filename eq "$HOME/.mime.types" then permi < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-fsread: filename eq "$HOME/.terminfo.db" then perm < + native-fsread: filename eq "/obj" then permit < + native-fsread: filename eq "/tmp" then permit native-fsread: filename eq "/tmp" then permit + > native-fswrite: filename match "/tmp/lynx-*" then permit + native-fsread: filename match "/tmp/lynx-*/." then permit native-fsread: filename match "/tmp/lynx-*/." then permit + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "/etc/lynx.cfg" then permit + > native-fsread: filename eq "/" then permit + > native-fsread: filename eq "/usr/obj/bin/systrace/." then + > native-fsread: filename eq "/usr/obj/bin" then permit + > native-fcntl: permit + > native-getdirentries: permit + > native-lseek: permit + > native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr" then permit native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then p < + native-fsread: filename match "/usr/lib/libcrypto.so.*" t < + native-fsread: filename match "/usr/lib/libncurses.so.*" < + native-fsread: filename match "/usr/lib/libssl.so.*" then < + native-fsread: filename eq "/usr/libdata" then permit native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename eq "/usr/libexec" then permit native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename eq "/usr/lkm" then permit native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename eq "/usr/local" then permit native-fsread: filename eq "/usr/local" then permit + native-fsread: filename eq "/usr/mdec" then permit native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/usr/obj" then permit | native-fsread: filename eq "/home" then permit + native-fsread: filename eq "/usr/obj/bin" then permit | native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." then | native-fsread: filename eq "$HOME/.lynxrc" then permit + > native-fsread: filename match "/<non-existent filename>: + native-fsread: filename eq "/usr/obj/bin/systrace/.mailca native-fsread: filename eq "/usr/obj/bin/systrace/.mailca + > native-fsread: filename eq "$HOME/.mailcap" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.t native-fsread: filename eq "/usr/obj/bin/systrace/.mime.t + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-sigaction: permit + > native-ioctl: permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "/usr/share/misc/terminfo.db" native-fsread: filename eq "/usr/share/misc/terminfo.db" + > native-pread: permit + > native-write: permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + native-fsread: filename eq "/var/run/dev.db" then permit native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/var/run/ld.so.hints" then pe | native-fsread: filename eq "/etc/utmp" then permit + native-fstat: permit < + native-fswrite: filename match "/tmp/lynx-*" then permit < + native-getdirentries: permit < + native-getpid: permit < + native-gettimeofday: permit < + native-ioctl: permit < + native-issetugid: permit < + native-lseek: permit < + native-mmap: permit < + native-mprotect: prot eq "PROT_READ" then permit < + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permi < + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then perm < + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" < + native-munmap: permit < + native-nanosleep: permit < + native-poll: permit native-poll: permit + native-pread: permit | native-nanosleep: permit + native-read: permit | native-gettimeofday: permit + native-recvfrom: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + native-select: permit < + native-sendto: true then permit < + native-sigaction: permit < + native-sigprocmask: permit < + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + > native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + > native-sendto: true then permit + > native-select: permit + > native-recvfrom: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + native-write: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + > native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_a1.out b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_a1.out new file mode 100644 index 0000000..2a0f532 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_a1.out @@ -0,0 +1,100 @@ +Policy: /usr/bin/lynx, Emulation: native Policy: /usr/bin/lynx, Emulation: native + > native-issetugid: permit + > native-mprotect: permit + > native-mmap: permit + native-__sysctl: permit native-__sysctl: permit + > native-fsread: filename eq "/var/run/ld.so.hints" then pe + > native-fstat: permit + native-close: permit native-close: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe | native-fsread: filename match "/usr/lib/libssl.so.*" then + native-connect: sockaddr match "inet-\\\[*\\\]:80" then p | native-read: permit + native-exit: permit | native-fsread: filename match "/usr/lib/libcrypto.so.*" t + native-fcntl: cmd eq "F_SETFD" then permit | native-fsread: filename match "/usr/lib/libncurses.so.*" + native-fsread: filename eq "/" then permit | native-fsread: filename match "/usr/lib/libc.so.*" then p + native-fsread: filename match "/<non-existent filename>: | native-munmap: permit + native-fsread: filename eq "/etc/lynx.cfg" then permit | native-sigprocmask: permit + native-fsread: filename eq "/etc/malloc.conf" then permit native-fsread: filename eq "/etc/malloc.conf" then permit + native-fsread: filename eq "/etc/resolv.conf" then permit | native-getpid: permit + native-fsread: filename eq "/etc/utmp" then permit < + native-fsread: filename eq "/home" then permit < + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then per < + native-fsread: filename eq "$HOME/.lynxrc" then permit < + native-fsread: filename eq "$HOME/.mailcap" then permit < + native-fsread: filename eq "$HOME/.mime.types" then permi < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-fsread: filename eq "$HOME/.terminfo.db" then perm < + native-fsread: filename eq "/obj" then permit < + native-fsread: filename eq "/tmp" then permit native-fsread: filename eq "/tmp" then permit + native-fsread: filename match "/tmp/lynx-*/." then permit native-fswrite: filename match "/tmp/lynx-*" then permit + ) native-fsread: filename match "/tmp/lynx-*/." then permit + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "/etc/lynx.cfg" then permit + > native-fsread: filename eq "/" then permit + > native-fsread: filename eq "/usr/obj/bin/systrace/." then + > native-fsread: filename eq "/usr/obj/bin" then permit + > native-fcntl: permit + > native-getdirentries: permit + > native-lseek: permit + > native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr" then permit native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then p native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename match "/usr/lib/libcrypto.so.*" t native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename match "/usr/lib/libncurses.so.*" native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename match "/usr/lib/libssl.so.*" then native-fsread: filename eq "/usr/local" then permit + native-fsread: filename eq "/usr/libdata" then permit native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/usr/libexec" then permit native-fsread: filename eq "/home" then permit + native-fsread: filename eq "/usr/lkm" then permit native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/usr/local" then permit native-fsread: filename eq "$HOME/.lynxrc" then permit + native-fsread: filename eq "/usr/mdec" then permit native-fsread: filename match "/<non-existent filename>: + native-fsread: filename eq "/usr/obj" then permit native-fsread: filename eq "/usr/obj/bin/systrace/.mailca + native-fsread: filename eq "/usr/obj/bin" then permit native-fsread: filename eq "$HOME/.mailcap" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." then native-fsread: filename eq "/usr/obj/bin/systrace/.mime.t + native-fsread: filename eq "/usr/obj/bin/systrace/.mailca ( + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.t ( + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-sigaction: permit + > native-ioctl: permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "/usr/share/misc/terminfo.db" native-fsread: filename eq "/usr/share/misc/terminfo.db" + > native-pread: permit + > native-write: permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + native-fsread: filename eq "/var/run/dev.db" then permit native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/var/run/ld.so.hints" then pe | native-fsread: filename eq "/etc/utmp" then permit + native-fstat: permit < + native-fswrite: filename match "/tmp/lynx-*" then permit < + native-getdirentries: permit < + native-getpid: permit < + native-gettimeofday: permit < + native-ioctl: permit < + native-issetugid: permit < + native-lseek: permit < + native-mmap: permit < + native-mprotect: prot eq "PROT_READ" then permit < + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permi < + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then perm < + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" < + native-munmap: permit < + native-nanosleep: permit < + native-poll: permit native-poll: permit + native-pread: permit | native-nanosleep: permit + native-read: permit | native-gettimeofday: permit + native-recvfrom: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + native-select: permit < + native-sendto: true then permit < + native-sigaction: permit < + native-sigprocmask: permit < + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + > native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + > native-sendto: true then permit + > native-select: permit + > native-recvfrom: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + native-write: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + > native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_a2.out b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_a2.out new file mode 100644 index 0000000..4e0d349 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_a2.out @@ -0,0 +1,96 @@ +Policy: /usr/bin/lynx, Emulation: native Policy: /usr/bin/lynx, Emulation: native + native-issetugid: permit < + native-mprotect: permit < + native-mmap: permit < + native-__sysctl: permit native-__sysctl: permit + native-fsread: filename eq "/var/run/ld.so.hints" then pe < + native-fstat: permit < + native-close: permit native-close: permit + native-fsread: filename match "/usr/lib/libssl.so.*" then | native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + native-read: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + native-fsread: filename match "/usr/lib/libcrypto.so.*" t | native-exit: permit + native-fsread: filename match "/usr/lib/libncurses.so.*" | native-fcntl: cmd eq "F_SETFD" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then p | native-fsread: filename eq "/" then permit + native-munmap: permit | native-fsread: filename match "/<non-existent filename>: + native-sigprocmask: permit | native-fsread: filename eq "/etc/lynx.cfg" then permit + native-fsread: filename eq "/etc/malloc.conf" then permit native-fsread: filename eq "/etc/malloc.conf" then permit + native-getpid: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + > native-fsread: filename eq "/etc/utmp" then permit + > native-fsread: filename eq "/home" then permit + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + > native-fsread: filename eq "$HOME/.lynxrc" then permit + > native-fsread: filename eq "$HOME/.mailcap" then permit + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-fsread: filename eq "$HOME/.terminfo" then permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/tmp" then permit native-fsread: filename eq "/tmp" then permit + native-fswrite: filename match "/tmp/lynx-*" then permit native-fsread: filename match "/tmp/lynx-*/." then permit + native-fsread: filename match "/tmp/lynx-*/." then permit ( + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "/etc/lynx.cfg" then permit < + native-fsread: filename eq "/" then permit < + native-fsread: filename eq "/usr/obj/bin/systrace/." then < + native-fsread: filename eq "/usr/obj/bin" then permit < + native-fcntl: permit < + native-getdirentries: permit < + native-lseek: permit < + native-fsread: filename eq "/usr/obj" then permit < + native-fsread: filename eq "/usr" then permit native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename eq "/usr/libdata" then permit native-fsread: filename match "/usr/lib/libc.so.*" then p + native-fsread: filename eq "/usr/libexec" then permit native-fsread: filename match "/usr/lib/libcrypto.so.*" t + native-fsread: filename eq "/usr/lkm" then permit native-fsread: filename match "/usr/lib/libncurses.so.*" + native-fsread: filename eq "/usr/local" then permit native-fsread: filename match "/usr/lib/libssl.so.*" then + native-fsread: filename eq "/usr/mdec" then permit native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename eq "/home" then permit native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename eq "/obj" then permit native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename eq "$HOME/.lynxrc" then permit native-fsread: filename eq "/usr/local" then permit + native-fsread: filename match "/<non-existent filename>: native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mailca native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "$HOME/.mailcap" then permit native-fsread: filename eq "/usr/obj/bin" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.t native-fsread: filename eq "/usr/obj/bin/systrace/." then + ) native-fsread: filename eq "/usr/obj/bin/systrace/.mailca + ) native-fsread: filename eq "/usr/obj/bin/systrace/.mime.t + native-fsread: filename eq "$HOME/.mime.types" then permi < + native-sigaction: permit < + native-ioctl: permit < + native-fsread: filename eq "$HOME/.terminfo.db" then perm < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-fsread: filename eq "/usr/share/misc/terminfo.db" native-fsread: filename eq "/usr/share/misc/terminfo.db" + native-pread: permit < + native-write: permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then per < + native-fsread: filename eq "/var/run/dev.db" then permit native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/etc/utmp" then permit | native-fsread: filename eq "/var/run/ld.so.hints" then pe + native-poll: permit | native-fstat: permit + native-nanosleep: permit | native-fswrite: filename match "/tmp/lynx-*" then permit + > native-getdirentries: permit + > native-getpid: permit + native-gettimeofday: permit native-gettimeofday: permit + native-fsread: filename eq "/etc/resolv.conf" then permit | native-ioctl: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK | native-issetugid: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe | native-lseek: permit + native-sendto: true then permit | native-mmap: permit + native-select: permit | native-mprotect: prot eq "PROT_READ" then permit + > native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permi + > native-mprotect: prot eq "PROT_READ|PROT_WRITE" then perm + > native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" + > native-munmap: permit + > native-nanosleep: permit + > native-poll: permit + > native-pread: permit + > native-read: permit + native-recvfrom: permit native-recvfrom: permit + > native-select: permit + > native-sendto: true then permit + > native-sigaction: permit + > native-sigprocmask: permit + > native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + native-connect: sockaddr match "inet-\\\[*\\\]:80" then p | native-write: permit + native-exit: permit < diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_b1.out b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_b1.out new file mode 100644 index 0000000..3e548b6 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_b1.out @@ -0,0 +1,69 @@ + > native-issetugid: permit + > native-mprotect: permit + > native-mmap: permit + > native-fsread: filename eq "/var/run/ld.so.hints" then pe + > native-fstat: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe | native-fsread: filename match "/usr/lib/libssl.so.*" then + native-connect: sockaddr match "inet-\\\[*\\\]:80" then p | native-read: permit + native-exit: permit | native-fsread: filename match "/usr/lib/libcrypto.so.*" t + native-fcntl: cmd eq "F_SETFD" then permit | native-fsread: filename match "/usr/lib/libncurses.so.*" + native-fsread: filename eq "/" then permit | native-fsread: filename match "/usr/lib/libc.so.*" then p + native-fsread: filename match "/<non-existent filename>: | native-munmap: permit + native-fsread: filename eq "/etc/lynx.cfg" then permit | native-sigprocmask: permit + native-fsread: filename eq "/etc/resolv.conf" then permit | native-getpid: permit + native-fsread: filename eq "/etc/utmp" then permit < + native-fsread: filename eq "/home" then permit < + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then per < + native-fsread: filename eq "$HOME/.lynxrc" then permit < + native-fsread: filename eq "$HOME/.mailcap" then permit < + native-fsread: filename eq "$HOME/.mime.types" then permi < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-fsread: filename eq "$HOME/.terminfo.db" then perm < + native-fsread: filename eq "/obj" then permit < + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "/etc/lynx.cfg" then permit + > native-fsread: filename eq "/" then permit + > native-fsread: filename eq "/usr/obj/bin/systrace/." then + > native-fsread: filename eq "/usr/obj/bin" then permit + > native-fcntl: permit + > native-getdirentries: permit + > native-lseek: permit + > native-fsread: filename eq "/usr/obj" then permit + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-sigaction: permit + > native-ioctl: permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "$HOME/.terminfo" then permit + > native-pread: permit + > native-write: permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + native-fsread: filename eq "/var/run/ld.so.hints" then pe | native-fsread: filename eq "/etc/utmp" then permit + native-fstat: permit < + native-fswrite: filename match "/tmp/lynx-*" then permit < + native-getdirentries: permit < + native-getpid: permit < + native-gettimeofday: permit < + native-ioctl: permit < + native-issetugid: permit < + native-lseek: permit < + native-mmap: permit < + native-mprotect: prot eq "PROT_READ" then permit < + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permi < + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then perm < + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" < + native-munmap: permit < + native-nanosleep: permit < + native-pread: permit | native-nanosleep: permit + native-read: permit | native-gettimeofday: permit + native-recvfrom: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + native-select: permit < + native-sendto: true then permit < + native-sigaction: permit < + native-sigprocmask: permit < + > native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + > native-sendto: true then permit + > native-select: permit + > native-recvfrom: permit + native-write: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + > native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_b2.out b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_b2.out new file mode 100644 index 0000000..4504c36 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_b2.out @@ -0,0 +1,65 @@ + native-issetugid: permit < + native-mprotect: permit < + native-mmap: permit < + native-fsread: filename eq "/var/run/ld.so.hints" then pe < + native-fstat: permit < + native-fsread: filename match "/usr/lib/libssl.so.*" then | native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + native-read: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + native-fsread: filename match "/usr/lib/libcrypto.so.*" t | native-exit: permit + native-fsread: filename match "/usr/lib/libncurses.so.*" | native-fcntl: cmd eq "F_SETFD" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then p | native-fsread: filename eq "/" then permit + native-munmap: permit | native-fsread: filename match "/<non-existent filename>: + native-sigprocmask: permit | native-fsread: filename eq "/etc/lynx.cfg" then permit + native-getpid: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + > native-fsread: filename eq "/etc/utmp" then permit + > native-fsread: filename eq "/home" then permit + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + > native-fsread: filename eq "$HOME/.lynxrc" then permit + > native-fsread: filename eq "$HOME/.mailcap" then permit + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-fsread: filename eq "$HOME/.terminfo" then permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "/etc/lynx.cfg" then permit < + native-fsread: filename eq "/" then permit < + native-fsread: filename eq "/usr/obj/bin/systrace/." then < + native-fsread: filename eq "/usr/obj/bin" then permit < + native-fcntl: permit < + native-getdirentries: permit < + native-lseek: permit < + native-fsread: filename eq "/usr/obj" then permit < + native-fsread: filename eq "$HOME/.mime.types" then permi < + native-sigaction: permit < + native-ioctl: permit < + native-fsread: filename eq "$HOME/.terminfo.db" then perm < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-pread: permit < + native-write: permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then per < + native-fsread: filename eq "/etc/utmp" then permit | native-fsread: filename eq "/var/run/ld.so.hints" then pe + native-poll: permit | native-fstat: permit + native-nanosleep: permit | native-fswrite: filename match "/tmp/lynx-*" then permit + > native-getdirentries: permit + > native-getpid: permit + native-fsread: filename eq "/etc/resolv.conf" then permit | native-ioctl: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK | native-issetugid: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe | native-lseek: permit + native-sendto: true then permit | native-mmap: permit + native-select: permit | native-mprotect: prot eq "PROT_READ" then permit + > native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permi + > native-mprotect: prot eq "PROT_READ|PROT_WRITE" then perm + > native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" + > native-munmap: permit + > native-nanosleep: permit + > native-poll: permit + > native-pread: permit + > native-read: permit + > native-select: permit + > native-sendto: true then permit + > native-sigaction: permit + > native-sigprocmask: permit + > native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + native-connect: sockaddr match "inet-\\\[*\\\]:80" then p | native-write: permit + native-exit: permit < diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_c1.out b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_c1.out new file mode 100644 index 0000000..e9ac88e --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_c1.out @@ -0,0 +1,99 @@ +Policy: /usr/bin/lynx, Emulation: native ( + > native-issetugid: permit + > native-mprotect: permit + > native-mmap: permit + native-__sysctl: permit ( + > native-fsread: filename eq "/var/run/ld.so.hints" then pe + > native-fstat: permit + native-close: permit ( + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe | native-fsread: filename match "/usr/lib/libssl.so.*" then + native-connect: sockaddr match "inet-\\\[*\\\]:80" then p | native-read: permit + native-exit: permit | native-fsread: filename match "/usr/lib/libcrypto.so.*" t + native-fcntl: cmd eq "F_SETFD" then permit | native-fsread: filename match "/usr/lib/libncurses.so.*" + native-fsread: filename eq "/" then permit | native-fsread: filename match "/usr/lib/libc.so.*" then p + native-fsread: filename match "/<non-existent filename>: | native-munmap: permit + native-fsread: filename eq "/etc/lynx.cfg" then permit | native-sigprocmask: permit + native-fsread: filename eq "/etc/malloc.conf" then permit ( + native-fsread: filename eq "/etc/resolv.conf" then permit | native-getpid: permit + native-fsread: filename eq "/etc/utmp" then permit < + native-fsread: filename eq "/home" then permit < + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then per < + native-fsread: filename eq "$HOME/.lynxrc" then permit < + native-fsread: filename eq "$HOME/.mailcap" then permit < + native-fsread: filename eq "$HOME/.mime.types" then permi < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-fsread: filename eq "$HOME/.terminfo.db" then perm < + native-fsread: filename eq "/obj" then permit < + native-fsread: filename eq "/tmp" then permit ( + native-fsread: filename match "/tmp/lynx-*/." then permit ( + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "/etc/lynx.cfg" then permit + > native-fsread: filename eq "/" then permit + > native-fsread: filename eq "/usr/obj/bin/systrace/." then + > native-fsread: filename eq "/usr/obj/bin" then permit + > native-fcntl: permit + > native-getdirentries: permit + > native-lseek: permit + > native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr" then permit ( + native-fsread: filename eq "/usr/bin" then permit ( + native-fsread: filename eq "/usr/games" then permit ( + native-fsread: filename eq "/usr/include" then permit ( + native-fsread: filename eq "/usr/lib" then permit ( + native-fsread: filename match "/usr/lib/libc.so.*" then p ( + native-fsread: filename match "/usr/lib/libcrypto.so.*" t ( + native-fsread: filename match "/usr/lib/libncurses.so.*" ( + native-fsread: filename match "/usr/lib/libssl.so.*" then ( + native-fsread: filename eq "/usr/libdata" then permit ( + native-fsread: filename eq "/usr/libexec" then permit ( + native-fsread: filename eq "/usr/lkm" then permit ( + native-fsread: filename eq "/usr/local" then permit ( + native-fsread: filename eq "/usr/mdec" then permit ( + native-fsread: filename eq "/usr/obj" then permit ( + native-fsread: filename eq "/usr/obj/bin" then permit ( + native-fsread: filename eq "/usr/obj/bin/systrace/." then ( + native-fsread: filename eq "/usr/obj/bin/systrace/.mailca ( + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.t ( + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-sigaction: permit + > native-ioctl: permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "/usr/share/misc/terminfo.db" ( + > native-pread: permit + > native-write: permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + native-fsread: filename eq "/var/run/dev.db" then permit ( + native-fsread: filename eq "/var/run/ld.so.hints" then pe | native-fsread: filename eq "/etc/utmp" then permit + native-fstat: permit < + native-fswrite: filename match "/tmp/lynx-*" then permit < + native-getdirentries: permit < + native-getpid: permit < + native-gettimeofday: permit < + native-ioctl: permit < + native-issetugid: permit < + native-lseek: permit < + native-mmap: permit < + native-mprotect: prot eq "PROT_READ" then permit < + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permi < + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then perm < + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" < + native-munmap: permit < + native-nanosleep: permit < + native-poll: permit ( + native-pread: permit | native-nanosleep: permit + native-read: permit | native-gettimeofday: permit + native-recvfrom: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + native-select: permit < + native-sendto: true then permit < + native-sigaction: permit < + native-sigprocmask: permit < + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK ( + > native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + > native-sendto: true then permit + > native-select: permit + > native-recvfrom: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK ( + native-write: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + > native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_c2.out b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_c2.out new file mode 100644 index 0000000..fe7af0e --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_c2.out @@ -0,0 +1,94 @@ +Policy: /usr/bin/lynx, Emulation: native ( + native-issetugid: permit < + native-mprotect: permit < + native-mmap: permit < + native-__sysctl: permit ( + native-fsread: filename eq "/var/run/ld.so.hints" then pe < + native-fstat: permit < + native-close: permit ( + native-fsread: filename match "/usr/lib/libssl.so.*" then | native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + native-read: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + native-fsread: filename match "/usr/lib/libcrypto.so.*" t | native-exit: permit + native-fsread: filename match "/usr/lib/libncurses.so.*" | native-fcntl: cmd eq "F_SETFD" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then p | native-fsread: filename eq "/" then permit + native-munmap: permit | native-fsread: filename match "/<non-existent filename>: + native-sigprocmask: permit | native-fsread: filename eq "/etc/lynx.cfg" then permit + native-fsread: filename eq "/etc/malloc.conf" then permit ( + native-getpid: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + > native-fsread: filename eq "/etc/utmp" then permit + > native-fsread: filename eq "/home" then permit + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + > native-fsread: filename eq "$HOME/.lynxrc" then permit + > native-fsread: filename eq "$HOME/.mailcap" then permit + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-fsread: filename eq "$HOME/.terminfo" then permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/tmp" then permit ( + native-fswrite: filename match "/tmp/lynx-*" then permit ( + native-fsread: filename match "/tmp/lynx-*/." then permit ( + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "/etc/lynx.cfg" then permit < + native-fsread: filename eq "/" then permit < + native-fsread: filename eq "/usr/obj/bin/systrace/." then < + native-fsread: filename eq "/usr/obj/bin" then permit < + native-fcntl: permit < + native-getdirentries: permit < + native-lseek: permit < + native-fsread: filename eq "/usr/obj" then permit < + native-fsread: filename eq "/usr" then permit ( + native-fsread: filename eq "/usr/bin" then permit ( + native-fsread: filename eq "/usr/games" then permit ( + native-fsread: filename eq "/usr/include" then permit ( + native-fsread: filename eq "/usr/lib" then permit ( + native-fsread: filename eq "/usr/libdata" then permit ( + native-fsread: filename eq "/usr/libexec" then permit ( + native-fsread: filename eq "/usr/lkm" then permit ( + native-fsread: filename eq "/usr/local" then permit ( + native-fsread: filename eq "/usr/mdec" then permit ( + native-fsread: filename eq "/home" then permit ( + native-fsread: filename eq "/obj" then permit ( + native-fsread: filename eq "$HOME/.lynxrc" then permit ( + native-fsread: filename match "/<non-existent filename>: ( + native-fsread: filename eq "/usr/obj/bin/systrace/.mailca ( + native-fsread: filename eq "$HOME/.mailcap" then permit ( + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.t ( + native-fsread: filename eq "$HOME/.mime.types" then permi < + native-sigaction: permit < + native-ioctl: permit < + native-fsread: filename eq "$HOME/.terminfo.db" then perm < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-fsread: filename eq "/usr/share/misc/terminfo.db" ( + native-pread: permit < + native-write: permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then per < + native-fsread: filename eq "/var/run/dev.db" then permit ( + native-fsread: filename eq "/etc/utmp" then permit | native-fsread: filename eq "/var/run/ld.so.hints" then pe + native-poll: permit | native-fstat: permit + native-nanosleep: permit | native-fswrite: filename match "/tmp/lynx-*" then permit + > native-getdirentries: permit + > native-getpid: permit + native-gettimeofday: permit ( + native-fsread: filename eq "/etc/resolv.conf" then permit | native-ioctl: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK | native-issetugid: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe | native-lseek: permit + native-sendto: true then permit | native-mmap: permit + native-select: permit | native-mprotect: prot eq "PROT_READ" then permit + > native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permi + > native-mprotect: prot eq "PROT_READ|PROT_WRITE" then perm + > native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" + > native-munmap: permit + > native-nanosleep: permit + > native-poll: permit + > native-pread: permit + > native-read: permit + native-recvfrom: permit ( + > native-select: permit + > native-sendto: true then permit + > native-sigaction: permit + > native-sigprocmask: permit + > native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK ( + native-connect: sockaddr match "inet-\\\[*\\\]:80" then p | native-write: permit + native-exit: permit < diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_d1.out b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_d1.out new file mode 100644 index 0000000..3e548b6 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_d1.out @@ -0,0 +1,69 @@ + > native-issetugid: permit + > native-mprotect: permit + > native-mmap: permit + > native-fsread: filename eq "/var/run/ld.so.hints" then pe + > native-fstat: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe | native-fsread: filename match "/usr/lib/libssl.so.*" then + native-connect: sockaddr match "inet-\\\[*\\\]:80" then p | native-read: permit + native-exit: permit | native-fsread: filename match "/usr/lib/libcrypto.so.*" t + native-fcntl: cmd eq "F_SETFD" then permit | native-fsread: filename match "/usr/lib/libncurses.so.*" + native-fsread: filename eq "/" then permit | native-fsread: filename match "/usr/lib/libc.so.*" then p + native-fsread: filename match "/<non-existent filename>: | native-munmap: permit + native-fsread: filename eq "/etc/lynx.cfg" then permit | native-sigprocmask: permit + native-fsread: filename eq "/etc/resolv.conf" then permit | native-getpid: permit + native-fsread: filename eq "/etc/utmp" then permit < + native-fsread: filename eq "/home" then permit < + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then per < + native-fsread: filename eq "$HOME/.lynxrc" then permit < + native-fsread: filename eq "$HOME/.mailcap" then permit < + native-fsread: filename eq "$HOME/.mime.types" then permi < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-fsread: filename eq "$HOME/.terminfo.db" then perm < + native-fsread: filename eq "/obj" then permit < + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "/etc/lynx.cfg" then permit + > native-fsread: filename eq "/" then permit + > native-fsread: filename eq "/usr/obj/bin/systrace/." then + > native-fsread: filename eq "/usr/obj/bin" then permit + > native-fcntl: permit + > native-getdirentries: permit + > native-lseek: permit + > native-fsread: filename eq "/usr/obj" then permit + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-sigaction: permit + > native-ioctl: permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "$HOME/.terminfo" then permit + > native-pread: permit + > native-write: permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + native-fsread: filename eq "/var/run/ld.so.hints" then pe | native-fsread: filename eq "/etc/utmp" then permit + native-fstat: permit < + native-fswrite: filename match "/tmp/lynx-*" then permit < + native-getdirentries: permit < + native-getpid: permit < + native-gettimeofday: permit < + native-ioctl: permit < + native-issetugid: permit < + native-lseek: permit < + native-mmap: permit < + native-mprotect: prot eq "PROT_READ" then permit < + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permi < + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then perm < + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" < + native-munmap: permit < + native-nanosleep: permit < + native-pread: permit | native-nanosleep: permit + native-read: permit | native-gettimeofday: permit + native-recvfrom: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + native-select: permit < + native-sendto: true then permit < + native-sigaction: permit < + native-sigprocmask: permit < + > native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + > native-sendto: true then permit + > native-select: permit + > native-recvfrom: permit + native-write: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + > native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_d2.out b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_d2.out new file mode 100644 index 0000000..4504c36 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_iflags_d2.out @@ -0,0 +1,65 @@ + native-issetugid: permit < + native-mprotect: permit < + native-mmap: permit < + native-fsread: filename eq "/var/run/ld.so.hints" then pe < + native-fstat: permit < + native-fsread: filename match "/usr/lib/libssl.so.*" then | native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + native-read: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + native-fsread: filename match "/usr/lib/libcrypto.so.*" t | native-exit: permit + native-fsread: filename match "/usr/lib/libncurses.so.*" | native-fcntl: cmd eq "F_SETFD" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then p | native-fsread: filename eq "/" then permit + native-munmap: permit | native-fsread: filename match "/<non-existent filename>: + native-sigprocmask: permit | native-fsread: filename eq "/etc/lynx.cfg" then permit + native-getpid: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + > native-fsread: filename eq "/etc/utmp" then permit + > native-fsread: filename eq "/home" then permit + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + > native-fsread: filename eq "$HOME/.lynxrc" then permit + > native-fsread: filename eq "$HOME/.mailcap" then permit + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-fsread: filename eq "$HOME/.terminfo" then permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "/etc/lynx.cfg" then permit < + native-fsread: filename eq "/" then permit < + native-fsread: filename eq "/usr/obj/bin/systrace/." then < + native-fsread: filename eq "/usr/obj/bin" then permit < + native-fcntl: permit < + native-getdirentries: permit < + native-lseek: permit < + native-fsread: filename eq "/usr/obj" then permit < + native-fsread: filename eq "$HOME/.mime.types" then permi < + native-sigaction: permit < + native-ioctl: permit < + native-fsread: filename eq "$HOME/.terminfo.db" then perm < + native-fsread: filename eq "$HOME/.terminfo" then permit < + native-pread: permit < + native-write: permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then per < + native-fsread: filename eq "/etc/utmp" then permit | native-fsread: filename eq "/var/run/ld.so.hints" then pe + native-poll: permit | native-fstat: permit + native-nanosleep: permit | native-fswrite: filename match "/tmp/lynx-*" then permit + > native-getdirentries: permit + > native-getpid: permit + native-fsread: filename eq "/etc/resolv.conf" then permit | native-ioctl: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK | native-issetugid: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe | native-lseek: permit + native-sendto: true then permit | native-mmap: permit + native-select: permit | native-mprotect: prot eq "PROT_READ" then permit + > native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permi + > native-mprotect: prot eq "PROT_READ|PROT_WRITE" then perm + > native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" + > native-munmap: permit + > native-nanosleep: permit + > native-poll: permit + > native-pread: permit + > native-read: permit + > native-select: permit + > native-sendto: true then permit + > native-sigaction: permit + > native-sigprocmask: permit + > native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + native-connect: sockaddr match "inet-\\\[*\\\]:80" then p | native-write: permit + native-exit: permit < diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_input1 b/contrib/netbsd-tests/usr.bin/sdiff/d_input1 new file mode 100644 index 0000000..686e8ea --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_input1 @@ -0,0 +1,72 @@ +Policy: /usr/bin/lynx, Emulation: native + native-__sysctl: permit + native-close: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then permit + native-connect: sockaddr match "inet-\\\[*\\\]:80" then permit + native-exit: permit + native-fcntl: cmd eq "F_SETFD" then permit + native-fsread: filename eq "/" then permit + native-fsread: filename match "/<non-existent filename>: *" then permit + native-fsread: filename eq "/etc/lynx.cfg" then permit + native-fsread: filename eq "/etc/malloc.conf" then permit + native-fsread: filename eq "/etc/resolv.conf" then permit + native-fsread: filename eq "/etc/utmp" then permit + native-fsread: filename eq "/home" then permit + native-fsread: filename eq "$HOME" then permit + native-fsread: filename eq "$HOME/.lynx-keymaps" then permit + native-fsread: filename eq "$HOME/.lynxrc" then permit + native-fsread: filename eq "$HOME/.mailcap" then permit + native-fsread: filename eq "$HOME/.mime.types" then permit + native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "$HOME/.terminfo.db" then permit + native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/tmp" then permit + native-fsread: filename match "/tmp/lynx-*/." then permit + native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then permit + native-fsread: filename match "/usr/lib/libcrypto.so.*" then permit + native-fsread: filename match "/usr/lib/libncurses.so.*" then permit + native-fsread: filename match "/usr/lib/libssl.so.*" then permit + native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename eq "/usr/local" then permit + native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr/obj/bin" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mailcap" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.types" then permit + native-fsread: filename eq "/usr/share/misc/terminfo.db" then permit + native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/var/run/ld.so.hints" then permit + native-fstat: permit + native-fswrite: filename match "/tmp/lynx-*" then permit + native-getdirentries: permit + native-getpid: permit + native-gettimeofday: permit + native-ioctl: permit + native-issetugid: permit + native-lseek: permit + native-mmap: permit + native-mprotect: prot eq "PROT_READ" then permit + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permit + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then permit + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" then permit + native-munmap: permit + native-nanosleep: permit + native-poll: permit + native-pread: permit + native-read: permit + native-recvfrom: permit + native-select: permit + native-sendto: true then permit + native-sigaction: permit + native-sigprocmask: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_DGRAM" then permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_STREAM" then permit + native-write: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_input2 b/contrib/netbsd-tests/usr.bin/sdiff/d_input2 new file mode 100644 index 0000000..70e1b57 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_input2 @@ -0,0 +1,69 @@ +Policy: /usr/bin/lynx, Emulation: native + native-issetugid: permit + native-mprotect: permit + native-mmap: permit + native-__sysctl: permit + native-fsread: filename eq "/var/run/ld.so.hints" then permit + native-fstat: permit + native-close: permit + native-fsread: filename match "/usr/lib/libssl.so.*" then permit + native-read: permit + native-fsread: filename match "/usr/lib/libcrypto.so.*" then permit + native-fsread: filename match "/usr/lib/libncurses.so.*" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then permit + native-munmap: permit + native-sigprocmask: permit + native-fsread: filename eq "/etc/malloc.conf" then permit + native-getpid: permit + native-fsread: filename eq "/tmp" then permit + native-fswrite: filename match "/tmp/lynx-*" then permit + native-fsread: filename match "/tmp/lynx-*/." then permit + native-fsread: filename eq "$HOME" then permit + native-fsread: filename eq "/etc/lynx.cfg" then permit + native-fsread: filename eq "/" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." then permit + native-fsread: filename eq "/usr/obj/bin" then permit + native-fcntl: permit + native-getdirentries: permit + native-lseek: permit + native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename eq "/usr/local" then permit + native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/home" then permit + native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "$HOME/.lynxrc" then permit + native-fsread: filename match "/<non-existent filename>: *" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mailcap" then permit + native-fsread: filename eq "$HOME/.mailcap" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.types" then permit + native-fsread: filename eq "$HOME/.mime.types" then permit + native-sigaction: permit + native-ioctl: permit + native-fsread: filename eq "$HOME/.terminfo.db" then permit + native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "/usr/share/misc/terminfo.db" then permit + native-pread: permit + native-write: permit + native-fsread: filename eq "$HOME/.lynx-keymaps" then permit + native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/etc/utmp" then permit + native-poll: permit + native-nanosleep: permit + native-gettimeofday: permit + native-fsread: filename eq "/etc/resolv.conf" then permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_DGRAM" then permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then permit + native-sendto: true then permit + native-select: permit + native-recvfrom: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_STREAM" then permit + native-connect: sockaddr match "inet-\\\[*\\\]:80" then permit + native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_oneline.in b/contrib/netbsd-tests/usr.bin/sdiff/d_oneline.in new file mode 100644 index 0000000..acbe86c --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_oneline.in @@ -0,0 +1 @@ +abcd diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_oneline_a.out b/contrib/netbsd-tests/usr.bin/sdiff/d_oneline_a.out new file mode 100644 index 0000000..99560a6 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_oneline_a.out @@ -0,0 +1 @@ + > abcd diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_oneline_b.out b/contrib/netbsd-tests/usr.bin/sdiff/d_oneline_b.out new file mode 100644 index 0000000..7300b1d --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_oneline_b.out @@ -0,0 +1 @@ +abcd < diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_same.out b/contrib/netbsd-tests/usr.bin/sdiff/d_same.out new file mode 100644 index 0000000..bce8944 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_same.out @@ -0,0 +1,72 @@ +Policy: /usr/bin/lynx, Emulation: native Policy: /usr/bin/lynx, Emulation: native + native-__sysctl: permit native-__sysctl: permit + native-close: permit native-close: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then perm native-connect: sockaddr eq "inet-[127.0.0.1]:53" then perm + native-connect: sockaddr match "inet-\\\[*\\\]:80" then per native-connect: sockaddr match "inet-\\\[*\\\]:80" then per + native-exit: permit native-exit: permit + native-fcntl: cmd eq "F_SETFD" then permit native-fcntl: cmd eq "F_SETFD" then permit + native-fsread: filename eq "/" then permit native-fsread: filename eq "/" then permit + native-fsread: filename match "/<non-existent filename>: *" native-fsread: filename match "/<non-existent filename>: *" + native-fsread: filename eq "/etc/lynx.cfg" then permit native-fsread: filename eq "/etc/lynx.cfg" then permit + native-fsread: filename eq "/etc/malloc.conf" then permit native-fsread: filename eq "/etc/malloc.conf" then permit + native-fsread: filename eq "/etc/resolv.conf" then permit native-fsread: filename eq "/etc/resolv.conf" then permit + native-fsread: filename eq "/etc/utmp" then permit native-fsread: filename eq "/etc/utmp" then permit + native-fsread: filename eq "/home" then permit native-fsread: filename eq "/home" then permit + native-fsread: filename eq "$HOME" then permit native-fsread: filename eq "$HOME" then permit + native-fsread: filename eq "$HOME/.lynx-keymaps" then permi native-fsread: filename eq "$HOME/.lynx-keymaps" then permi + native-fsread: filename eq "$HOME/.lynxrc" then permit native-fsread: filename eq "$HOME/.lynxrc" then permit + native-fsread: filename eq "$HOME/.mailcap" then permit native-fsread: filename eq "$HOME/.mailcap" then permit + native-fsread: filename eq "$HOME/.mime.types" then permit native-fsread: filename eq "$HOME/.mime.types" then permit + native-fsread: filename eq "$HOME/.terminfo" then permit native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "$HOME/.terminfo.db" then permit native-fsread: filename eq "$HOME/.terminfo.db" then permit + native-fsread: filename eq "/obj" then permit native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/tmp" then permit native-fsread: filename eq "/tmp" then permit + native-fsread: filename match "/tmp/lynx-*/." then permit native-fsread: filename match "/tmp/lynx-*/." then permit + native-fsread: filename eq "/usr" then permit native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then per native-fsread: filename match "/usr/lib/libc.so.*" then per + native-fsread: filename match "/usr/lib/libcrypto.so.*" the native-fsread: filename match "/usr/lib/libcrypto.so.*" the + native-fsread: filename match "/usr/lib/libncurses.so.*" th native-fsread: filename match "/usr/lib/libncurses.so.*" th + native-fsread: filename match "/usr/lib/libssl.so.*" then p native-fsread: filename match "/usr/lib/libssl.so.*" then p + native-fsread: filename eq "/usr/libdata" then permit native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename eq "/usr/libexec" then permit native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename eq "/usr/lkm" then permit native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename eq "/usr/local" then permit native-fsread: filename eq "/usr/local" then permit + native-fsread: filename eq "/usr/mdec" then permit native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/usr/obj" then permit native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr/obj/bin" then permit native-fsread: filename eq "/usr/obj/bin" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." then p native-fsread: filename eq "/usr/obj/bin/systrace/." then p + native-fsread: filename eq "/usr/obj/bin/systrace/.mailcap" native-fsread: filename eq "/usr/obj/bin/systrace/.mailcap" + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.typ native-fsread: filename eq "/usr/obj/bin/systrace/.mime.typ + native-fsread: filename eq "/usr/share/misc/terminfo.db" th native-fsread: filename eq "/usr/share/misc/terminfo.db" th + native-fsread: filename eq "/var/run/dev.db" then permit native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/var/run/ld.so.hints" then perm native-fsread: filename eq "/var/run/ld.so.hints" then perm + native-fstat: permit native-fstat: permit + native-fswrite: filename match "/tmp/lynx-*" then permit native-fswrite: filename match "/tmp/lynx-*" then permit + native-getdirentries: permit native-getdirentries: permit + native-getpid: permit native-getpid: permit + native-gettimeofday: permit native-gettimeofday: permit + native-ioctl: permit native-ioctl: permit + native-issetugid: permit native-issetugid: permit + native-lseek: permit native-lseek: permit + native-mmap: permit native-mmap: permit + native-mprotect: prot eq "PROT_READ" then permit native-mprotect: prot eq "PROT_READ" then permit + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permit native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permit + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then permit native-mprotect: prot eq "PROT_READ|PROT_WRITE" then permit + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" t native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" t + native-munmap: permit native-munmap: permit + native-nanosleep: permit native-nanosleep: permit + native-poll: permit native-poll: permit + native-pread: permit native-pread: permit + native-read: permit native-read: permit + native-recvfrom: permit native-recvfrom: permit + native-select: permit native-select: permit + native-sendto: true then permit native-sendto: true then permit + native-sigaction: permit native-sigaction: permit + native-sigprocmask: permit native-sigprocmask: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_D native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_D + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_S native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_S + native-write: permit native-write: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_short.out b/contrib/netbsd-tests/usr.bin/sdiff/d_short.out new file mode 100644 index 0000000..7a33460 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_short.out @@ -0,0 +1,15 @@ +Policy: /usr/bin/lynx, Emulation: native + native-issetugid: permit + native-mprotect: permit + native-mmap: permit + native-__sysctl: permit + native-close: permit + native-fsread: filename match "/usr/lib/libssl.so.*" then permit + native-read: permit + native-fsread: filename match "/usr/lib/libcrypto.so.*" then permit + native-fsread: filename match "/usr/lib/libncurses.so.*" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then permit + native-munmap: permit + native-sigprocmask: permit + native-fsread: filename eq "/etc/malloc.conf" then permit + native-fsread: filename eq "/etc/resolv.conf" then permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_tabends.in b/contrib/netbsd-tests/usr.bin/sdiff/d_tabends.in new file mode 100644 index 0000000..0547049 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_tabends.in @@ -0,0 +1,17 @@ + +0 +01 +012 +0123 +01234 +012345 +0123456 +01234567 +012345670 +0123456701 +01234567012 +012345670123 +0123456701234 +01234567012345 +012345670123456 +0123456701234567 diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_tabends_a.out b/contrib/netbsd-tests/usr.bin/sdiff/d_tabends_a.out new file mode 100644 index 0000000..423bd02 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_tabends_a.out @@ -0,0 +1,17 @@ + < +0 < +01 < +012 < +0123 < +01234 < +012345 < +0123456 < +01234567 < +012345670 < +0123456701 < +01234567012 < +012345670123 < +0123456701234 < +0123456701234 < +0123456701234 < +0123456701234 < diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_tabends_b.out b/contrib/netbsd-tests/usr.bin/sdiff/d_tabends_b.out new file mode 100644 index 0000000..b180705 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_tabends_b.out @@ -0,0 +1,17 @@ + > + > 0 + > 01 + > 012 + > 0123 + > 01234 + > 012345 + > 0123456 + > 01234567 + > 012345670 + > 0123456701 + > 01234567012 + > 012345670123 + > 0123456701234 + > 0123456701234 + > 0123456701234 + > 0123456701234 diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_tabends_c.out b/contrib/netbsd-tests/usr.bin/sdiff/d_tabends_c.out new file mode 100644 index 0000000..c301382 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_tabends_c.out @@ -0,0 +1,17 @@ + < +0 < +01 < +012 < +0123 < +01234 < +012345 < +0123456 < +01234567 < +01234567 < +01234567 < +01234567 < +01234567 < +01234567 < +01234567 < +01234567 < +01234567 < diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_tabs.out b/contrib/netbsd-tests/usr.bin/sdiff/d_tabs.out new file mode 100644 index 0000000..eb34bac --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_tabs.out @@ -0,0 +1,102 @@ +Policy: /usr/bin/lynx, Emulation: native Policy: /usr/bin/lynx, Emulation: native + > native-issetugid: permit + > native-mprotect: permit + > native-mmap: permit + native-__sysctl: permit native-__sysctl: permit + > native-fsread: filename eq "/var/run/ld.so.hints" then pe + > native-fstat: permit + native-close: permit native-close: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then | native-fsread: filename match "/usr/lib/libssl.so.*" then + native-connect: sockaddr match "inet-\\\[*\\\]:80" then | native-read: permit + native-exit: permit | native-fsread: filename match "/usr/lib/libcrypto.so.*" t + native-fcntl: cmd eq "F_SETFD" then permit | native-fsread: filename match "/usr/lib/libncurses.so.*" + native-fsread: filename eq "/" then permit | native-fsread: filename match "/usr/lib/libc.so.*" then p + native-fsread: filename match "/<non-existent filename> | native-munmap: permit + native-fsread: filename eq "/etc/lynx.cfg" then permit | native-sigprocmask: permit + native-fsread: filename eq "/etc/malloc.conf" then perm native-fsread: filename eq "/etc/malloc.conf" then permit + native-fsread: filename eq "/etc/resolv.conf" then perm | native-getpid: permit + native-fsread: filename eq "/etc/utmp" then permit < + native-fsread: filename eq "/home" then permit < + native-fsread: filename eq "$HOME" then permit < + native-fsread: filename eq "$HOME/.lynx-keymaps" then p < + native-fsread: filename eq "$HOME/.lynxrc" then permit < + native-fsread: filename eq "$HOME/.mailcap" then permit < + native-fsread: filename eq "$HOME/.mime.types" then per < + native-fsread: filename eq "$HOME/.terminfo" then permi < + native-fsread: filename eq "$HOME/.terminfo.db" then pe < + native-fsread: filename eq "/obj" then permit < + native-fsread: filename eq "/tmp" then permit native-fsread: filename eq "/tmp" then permit + > native-fswrite: filename match "/tmp/lynx-*" then permit + native-fsread: filename match "/tmp/lynx-*/." then perm native-fsread: filename match "/tmp/lynx-*/." then permit + > native-fsread: filename eq "$HOME" then permit + > native-fsread: filename eq "/etc/lynx.cfg" then permit + > native-fsread: filename eq "/" then permit + > native-fsread: filename eq "/usr/obj/bin/systrace/." then + > native-fsread: filename eq "/usr/obj/bin" then permit + > native-fcntl: permit + > native-getdirentries: permit + > native-lseek: permit + > native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr" then permit native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then < + native-fsread: filename match "/usr/lib/libcrypto.so.*" < + native-fsread: filename match "/usr/lib/libncurses.so.* < + native-fsread: filename match "/usr/lib/libssl.so.*" th < + native-fsread: filename eq "/usr/libdata" then permit native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename eq "/usr/libexec" then permit native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename eq "/usr/lkm" then permit native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename eq "/usr/local" then permit native-fsread: filename eq "/usr/local" then permit + native-fsread: filename eq "/usr/mdec" then permit native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/usr/obj" then permit | native-fsread: filename eq "/home" then permit + native-fsread: filename eq "/usr/obj/bin" then permit | native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." th | native-fsread: filename eq "$HOME/.lynxrc" then permit + > native-fsread: filename match "/<non-existent filename>: + native-fsread: filename eq "/usr/obj/bin/systrace/.mail native-fsread: filename eq "/usr/obj/bin/systrace/.mailca + > native-fsread: filename eq "$HOME/.mailcap" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mime native-fsread: filename eq "/usr/obj/bin/systrace/.mime.t + > native-fsread: filename eq "$HOME/.mime.types" then permi + > native-sigaction: permit + > native-ioctl: permit + > native-fsread: filename eq "$HOME/.terminfo.db" then perm + > native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "/usr/share/misc/terminfo.db native-fsread: filename eq "/usr/share/misc/terminfo.db" + > native-pread: permit + > native-write: permit + > native-fsread: filename eq "$HOME/.lynx-keymaps" then per + native-fsread: filename eq "/var/run/dev.db" then permi native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/var/run/ld.so.hints" then | native-fsread: filename eq "/etc/utmp" then permit + native-fstat: permit < + native-fswrite: filename match "/tmp/lynx-*" then permi < + native-getdirentries: permit < + native-getpid: permit < + native-gettimeofday: permit < + native-ioctl: permit < + native-issetugid: permit < + native-lseek: permit < + native-mmap: permit < + native-mprotect: prot eq "PROT_READ" then permit < + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then per < + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then pe < + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXE < + native-munmap: permit < + native-nanosleep: permit < + native-poll: permit native-poll: permit + native-pread: permit | native-nanosleep: permit + native-read: permit | native-gettimeofday: permit + native-recvfrom: permit | native-fsread: filename eq "/etc/resolv.conf" then permit + native-select: permit < + native-sendto: true then permit < + native-sigaction: permit < + native-sigprocmask: permit < + native-socket: sockdom eq "AF_INET" and socktype eq "SO native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + > native-connect: sockaddr eq "inet-[127.0.0.1]:53" then pe + > native-sendto: true then permit + > native-select: permit + > native-recvfrom: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SO native-socket: sockdom eq "AF_INET" and socktype eq "SOCK + native-write: permit | native-connect: sockaddr match "inet-\\\[*\\\]:80" then p + > native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_tabs1.in b/contrib/netbsd-tests/usr.bin/sdiff/d_tabs1.in new file mode 100644 index 0000000..b5a1834 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_tabs1.in @@ -0,0 +1,72 @@ +Policy: /usr/bin/lynx, Emulation: native + native-__sysctl: permit + native-close: permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then permit + native-connect: sockaddr match "inet-\\\[*\\\]:80" then permit + native-exit: permit + native-fcntl: cmd eq "F_SETFD" then permit + native-fsread: filename eq "/" then permit + native-fsread: filename match "/<non-existent filename>: *" then permit + native-fsread: filename eq "/etc/lynx.cfg" then permit + native-fsread: filename eq "/etc/malloc.conf" then permit + native-fsread: filename eq "/etc/resolv.conf" then permit + native-fsread: filename eq "/etc/utmp" then permit + native-fsread: filename eq "/home" then permit + native-fsread: filename eq "$HOME" then permit + native-fsread: filename eq "$HOME/.lynx-keymaps" then permit + native-fsread: filename eq "$HOME/.lynxrc" then permit + native-fsread: filename eq "$HOME/.mailcap" then permit + native-fsread: filename eq "$HOME/.mime.types" then permit + native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "$HOME/.terminfo.db" then permit + native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "/tmp" then permit + native-fsread: filename match "/tmp/lynx-*/." then permit + native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then permit + native-fsread: filename match "/usr/lib/libcrypto.so.*" then permit + native-fsread: filename match "/usr/lib/libncurses.so.*" then permit + native-fsread: filename match "/usr/lib/libssl.so.*" then permit + native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename eq "/usr/local" then permit + native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr/obj/bin" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mailcap" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.types" then permit + native-fsread: filename eq "/usr/share/misc/terminfo.db" then permit + native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/var/run/ld.so.hints" then permit + native-fstat: permit + native-fswrite: filename match "/tmp/lynx-*" then permit + native-getdirentries: permit + native-getpid: permit + native-gettimeofday: permit + native-ioctl: permit + native-issetugid: permit + native-lseek: permit + native-mmap: permit + native-mprotect: prot eq "PROT_READ" then permit + native-mprotect: prot eq "PROT_READ|PROT_EXEC" then permit + native-mprotect: prot eq "PROT_READ|PROT_WRITE" then permit + native-mprotect: prot eq "PROT_READ|PROT_WRITE|PROT_EXEC" then permit + native-munmap: permit + native-nanosleep: permit + native-poll: permit + native-pread: permit + native-read: permit + native-recvfrom: permit + native-select: permit + native-sendto: true then permit + native-sigaction: permit + native-sigprocmask: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_DGRAM" then permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_STREAM" then permit + native-write: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/d_tabs2.in b/contrib/netbsd-tests/usr.bin/sdiff/d_tabs2.in new file mode 100644 index 0000000..d00f415 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/d_tabs2.in @@ -0,0 +1,69 @@ +Policy: /usr/bin/lynx, Emulation: native + native-issetugid: permit + native-mprotect: permit + native-mmap: permit + native-__sysctl: permit + native-fsread: filename eq "/var/run/ld.so.hints" then permit + native-fstat: permit + native-close: permit + native-fsread: filename match "/usr/lib/libssl.so.*" then permit + native-read: permit + native-fsread: filename match "/usr/lib/libcrypto.so.*" then permit + native-fsread: filename match "/usr/lib/libncurses.so.*" then permit + native-fsread: filename match "/usr/lib/libc.so.*" then permit + native-munmap: permit + native-sigprocmask: permit + native-fsread: filename eq "/etc/malloc.conf" then permit + native-getpid: permit + native-fsread: filename eq "/tmp" then permit + native-fswrite: filename match "/tmp/lynx-*" then permit + native-fsread: filename match "/tmp/lynx-*/." then permit + native-fsread: filename eq "$HOME" then permit + native-fsread: filename eq "/etc/lynx.cfg" then permit + native-fsread: filename eq "/" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/." then permit + native-fsread: filename eq "/usr/obj/bin" then permit + native-fcntl: permit + native-getdirentries: permit + native-lseek: permit + native-fsread: filename eq "/usr/obj" then permit + native-fsread: filename eq "/usr" then permit + native-fsread: filename eq "/usr/bin" then permit + native-fsread: filename eq "/usr/games" then permit + native-fsread: filename eq "/usr/include" then permit + native-fsread: filename eq "/usr/lib" then permit + native-fsread: filename eq "/usr/libdata" then permit + native-fsread: filename eq "/usr/libexec" then permit + native-fsread: filename eq "/usr/lkm" then permit + native-fsread: filename eq "/usr/local" then permit + native-fsread: filename eq "/usr/mdec" then permit + native-fsread: filename eq "/home" then permit + native-fsread: filename eq "/obj" then permit + native-fsread: filename eq "$HOME/.lynxrc" then permit + native-fsread: filename match "/<non-existent filename>: *" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mailcap" then permit + native-fsread: filename eq "$HOME/.mailcap" then permit + native-fsread: filename eq "/usr/obj/bin/systrace/.mime.types" then permit + native-fsread: filename eq "$HOME/.mime.types" then permit + native-sigaction: permit + native-ioctl: permit + native-fsread: filename eq "$HOME/.terminfo.db" then permit + native-fsread: filename eq "$HOME/.terminfo" then permit + native-fsread: filename eq "/usr/share/misc/terminfo.db" then permit + native-pread: permit + native-write: permit + native-fsread: filename eq "$HOME/.lynx-keymaps" then permit + native-fsread: filename eq "/var/run/dev.db" then permit + native-fsread: filename eq "/etc/utmp" then permit + native-poll: permit + native-nanosleep: permit + native-gettimeofday: permit + native-fsread: filename eq "/etc/resolv.conf" then permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_DGRAM" then permit + native-connect: sockaddr eq "inet-[127.0.0.1]:53" then permit + native-sendto: true then permit + native-select: permit + native-recvfrom: permit + native-socket: sockdom eq "AF_INET" and socktype eq "SOCK_STREAM" then permit + native-connect: sockaddr match "inet-\\\[*\\\]:80" then permit + native-exit: permit diff --git a/contrib/netbsd-tests/usr.bin/sdiff/t_sdiff.sh b/contrib/netbsd-tests/usr.bin/sdiff/t_sdiff.sh new file mode 100755 index 0000000..2d6fc2d --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/sdiff/t_sdiff.sh @@ -0,0 +1,206 @@ +# $NetBSD: t_sdiff.sh,v 1.1 2012/03/17 16:33:15 jruoho Exp $ +# +# Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# + +atf_test_case flags +flags_head() +{ + atf_set "descr" "Checks -l, -s and -w flags" +} +flags_body() +{ + atf_check -o file:$(atf_get_srcdir)/d_flags_l.out -s eq:1 \ + sdiff -l "$(atf_get_srcdir)/d_input1" "$(atf_get_srcdir)/d_input2" + + atf_check -o file:$(atf_get_srcdir)/d_flags_s.out -s eq:1 \ + sdiff -s "$(atf_get_srcdir)/d_input1" "$(atf_get_srcdir)/d_input2" + + atf_check -o file:$(atf_get_srcdir)/d_flags_w.out -s eq:1 \ + sdiff -w 125 "$(atf_get_srcdir)/d_input1" "$(atf_get_srcdir)/d_input2" +} + +atf_test_case iflags +iflags_head() +{ + atf_set "descr" "Checks flags -l, -s and -w combined with -I" +} +iflags_body() +{ + tail1="-w 125 -I .*filename.* $(atf_get_srcdir)/d_input1 $(atf_get_srcdir)/d_input2" + tail2="-w 125 -I .*filename.* $(atf_get_srcdir)/d_input2 $(atf_get_srcdir)/d_input1" + + atf_check -o file:$(atf_get_srcdir)/d_iflags_a1.out -s eq:1 sdiff ${tail1} + atf_check -o file:$(atf_get_srcdir)/d_iflags_a2.out -s eq:1 sdiff ${tail2} + atf_check -o file:$(atf_get_srcdir)/d_iflags_b1.out -s eq:1 sdiff -s ${tail1} + atf_check -o file:$(atf_get_srcdir)/d_iflags_b2.out -s eq:1 sdiff -s ${tail2} + atf_check -o file:$(atf_get_srcdir)/d_iflags_c1.out -s eq:1 sdiff -l ${tail1} + atf_check -o file:$(atf_get_srcdir)/d_iflags_c2.out -s eq:1 sdiff -l ${tail2} + atf_check -o file:$(atf_get_srcdir)/d_iflags_d1.out -s eq:1 sdiff -s ${tail1} + atf_check -o file:$(atf_get_srcdir)/d_iflags_d2.out -s eq:1 sdiff -s ${tail2} +} + +atf_test_case tabs +tabs_head() +{ + atf_set "descr" "Checks comparing files containing tabs" +} +tabs_body() +{ + atf_check -o file:$(atf_get_srcdir)/d_tabs.out -s eq:1 \ + sdiff "$(atf_get_srcdir)/d_tabs1.in" "$(atf_get_srcdir)/d_tabs2.in" +} + +atf_test_case tabends +tabends_head() +{ + atf_set "descr" "Checks correct handling of lines ended with tabs" +} +tabends_body() +{ + atf_check -o file:$(atf_get_srcdir)/d_tabends_a.out -s eq:1 \ + sdiff -w30 "$(atf_get_srcdir)/d_tabends.in" /dev/null + + atf_check -o file:$(atf_get_srcdir)/d_tabends_b.out -s eq:1 \ + sdiff -w30 /dev/null "$(atf_get_srcdir)/d_tabends.in" + + atf_check -o file:$(atf_get_srcdir)/d_tabends_c.out -s eq:1 \ + sdiff -w19 "$(atf_get_srcdir)/d_tabends.in" /dev/null +} + +atf_test_case merge +merge_head() +{ + atf_set "descr" "Checks interactive merging" +} +merge_body() +{ + merge_tail="-o merge.out $(atf_get_srcdir)/d_input1 \ +$(atf_get_srcdir)/d_input2 >/dev/null ; cat merge.out" + + cp $(atf_get_srcdir)/d_input* . + + atf_check -o file:d_input1 -x "yes l | sdiff ${merge_tail}" + atf_check -o file:d_input2 -x "yes r | sdiff ${merge_tail}" + + atf_check -o file:d_input1 -x \ + "yes el | EDITOR=cat VISUAL=cat sdiff ${merge_tail}" + atf_check -o file:d_input2 -x \ + "yes er | EDITOR=cat VISUAL=cat sdiff ${merge_tail}" + + atf_check -o file:d_input1 -x "yes l | sdiff -s ${merge_tail}" + atf_check -o file:d_input2 -x "yes r | sdiff -s ${merge_tail}" + atf_check -o file:d_input1 -x "yes l | sdiff -l ${merge_tail}" + atf_check -o file:d_input2 -x "yes r | sdiff -l ${merge_tail}" + atf_check -o file:d_input1 -x "yes l | sdiff -ls ${merge_tail}" + atf_check -o file:d_input2 -x "yes r | sdiff -ls ${merge_tail}" + + atf_check -o file:d_input1 -x "{ while :; do echo s; echo l; \ +echo v; echo l; done; } | sdiff ${merge_tail}" + + atf_check -o file:d_input2 -x "{ while :; do echo s; echo r; \ +echo v; echo r; done; } | sdiff ${merge_tail}" +} + +atf_test_case same +same_head() +{ + atf_set "descr" "Checks comparing file with itself" +} +same_body() +{ + atf_check -o file:$(atf_get_srcdir)/d_same.out \ + sdiff "$(atf_get_srcdir)/d_input1" "$(atf_get_srcdir)/d_input1" +} + +atf_test_case oneline +oneline_head() +{ + atf_set "descr" "Checks comparing one-line files" +} +oneline_body() +{ + atf_check -o file:$(atf_get_srcdir)/d_oneline_a.out -s eq:1 \ + sdiff /dev/null "$(atf_get_srcdir)/d_oneline.in" + + atf_check -o file:$(atf_get_srcdir)/d_oneline_b.out -s eq:1 \ + sdiff "$(atf_get_srcdir)/d_oneline.in" /dev/null +} + +atf_test_case dot +dot_head() +{ + atf_set "descr" "Checks comparing with file containing only one character" +} +dot_body() +{ + echo ". <" > expout + atf_check -o file:expout -s eq:1 sdiff "$(atf_get_srcdir)/d_dot.in" /dev/null + + echo " > ." > expout + atf_check -o file:expout -s eq:1 sdiff /dev/null "$(atf_get_srcdir)/d_dot.in" +} + +atf_test_case stdin +stdin_head() +{ + atf_set "descr" "Checks reading data from stdin" +} +stdin_body() +{ + echo " > stdin" > expout + atf_check -o file:expout -s eq:1 -x \ + "echo stdin | sdiff /dev/null /dev/stdin" + + echo "stdin <" > expout + atf_check -o file:expout -s eq:1 -x \ + "echo stdin | sdiff /dev/stdin /dev/null" +} + +atf_test_case short +short_head() +{ + atf_set "descr" "Checks premature stop of merging" +} +short_body() +{ + atf_check -o file:$(atf_get_srcdir)/d_short.out -x \ + "printf \"r\\nl\\nr\\nl\" | sdiff -o merge.out $(atf_get_srcdir)/d_input1 \ +$(atf_get_srcdir)/d_input2 >/dev/null ; cat merge.out" +} + +atf_init_test_cases() +{ + atf_add_test_case flags + atf_add_test_case iflags + atf_add_test_case tabs + atf_add_test_case tabends + atf_add_test_case merge + atf_add_test_case same + atf_add_test_case oneline + atf_add_test_case dot + atf_add_test_case stdin + atf_add_test_case short +} |