START usr.bin/lastcomm 2024-01-05T09:51:13Z ==== setup-rotate ==== touch /var/account/acct mv -f /var/account/acct.2 /var/account/acct.3 mv: /var/account/acct.2: No such file or directory *** Error 1 in target 'setup-rotate' (ignored) mv -f /var/account/acct.1 /var/account/acct.2 mv: /var/account/acct.1: No such file or directory *** Error 1 in target 'setup-rotate' (ignored) mv -f /var/account/acct.0 /var/account/acct.1 mv: /var/account/acct.0: No such file or directory *** Error 1 in target 'setup-rotate' (ignored) cp -f /var/account/acct /var/account/acct.0 sa -sq accton /var/account/acct ==== run-fork ==== cc -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -MD -MP -c /usr/src/regress/usr.bin/lastcomm/crash.c cc -o crash crash.o cc -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -MD -MP -c /usr/src/regress/usr.bin/lastcomm/trapstack.c cc -o trapstack trapstack.o cc -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -MD -MP -c /usr/src/regress/usr.bin/lastcomm/callstack.c cc -o callstack callstack.o cc -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -MD -MP -c /usr/src/regress/usr.bin/lastcomm/syscallwx.c cc -c -MD -MF gadget.d -o gadget.o /usr/src/regress/usr.bin/lastcomm/gadget.S cc -o syscallwx syscallwx.o gadget.o -Wl,-z,wxneeded cc -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -MD -MP -c /usr/src/regress/usr.bin/lastcomm/unveil.c cc -o unveil unveil.o # Create shell program, fork a sub shell, and check the -F flag. cp -f /bin/sh regress-fork ./regress-fork -c '( : ) &' lastcomm regress-fork | grep -q ' -F ' ==== run-trapstack ==== # Use invalid stack pointer, trap, SIGSEGV handler, check -M flag. cp -f trapstack regress-trapstack ./regress-trapstack lastcomm regress-trapstack | grep -q ' -MT ' ==== run-callstack ==== # Use invalid stack pointer, syscall, SIGSEGV handler, check -M flag. cp -f callstack regress-callstack ./regress-callstack *** Signal SIGSEGV in . (Makefile:60 'run-callstack') EXPECTED_FAIL ==== run-syscallwx ==== # Use writable syscall code, run SIGSEGV handler, check -M flag. cp -f syscallwx regress-syscallwx ./regress-syscallwx *** Signal SIGSEGV in . (Makefile:67 'run-syscallwx') EXPECTED_FAIL ==== run-core ==== # Create shell program, abort sub shell, and check the -DX flag. cp -f /bin/sh regress-core rm -f regress-core.core ulimit -c 100000; ./regress-core -c '( : ) & kill -SEGV $!; wait' lastcomm regress-core | grep -q ' -FDX ' ==== run-xsig ==== # Create shell program, kill sub shell, and check the -X flag. cp -f /bin/sh regress-xsig ./regress-xsig -c '( : ) & kill -KILL $!; wait' lastcomm regress-xsig | grep -q ' -FX ' ==== run-pledge ==== # Create perl program, violate pledge, and check the -P flag. cp -f /usr/bin/perl regress-pledge ulimit -c 0; ! ./regress-pledge -MOpenBSD::Pledge -e 'pledge("stdio") or die $!; chdir("/")' Abort trap lastcomm regress-pledge | grep -q ' -XP ' ==== run-unveil ==== # Attempt to open veiled file, check -U flag. cp -f unveil regress-unveil ./regress-unveil lastcomm regress-unveil | grep -q ' -U ' ==== run-trap ==== # Build crashing program, run SIGSEGV handler, and check the -T flag. cp -f crash regress-trap ./regress-trap lastcomm regress-trap | grep -q ' -T ' XFAIL usr.bin/lastcomm *** Signal SIGSEGV in . (Makefile:60 'run-callstack'), *** Signal SIGSEGV in . (Makefile:67 'run-syscallwx')