START usr.bin/lastcomm 2024-11-19T10:45:16Z ==== setup-rotate ==== touch /var/account/acct mv -f /var/account/acct.2 /var/account/acct.3 mv -f /var/account/acct.1 /var/account/acct.2 mv -f /var/account/acct.0 /var/account/acct.1 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 lastcomm regress-callstack | grep -q ' -MT ' ==== run-syscallwx ==== # Use writable syscall code, run SIGSEGV handler, check -M flag. cp -f syscallwx regress-syscallwx ./regress-syscallwx *** Signal SIGABRT in . (Makefile:67 'run-syscallwx') FAILED ==== 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 ' FAIL usr.bin/lastcomm *** Signal SIGABRT in . (Makefile:67 'run-syscallwx')