diff options
author | 2016-10-05 16:53:34 +0000 | |
---|---|---|
committer | 2016-10-05 16:53:34 +0000 | |
commit | c310b5e61497a86c5266b4736c7ffebf41480df6 (patch) | |
tree | aefa7d6dcac46b4f3ed52e09fbdf77cd37459bb3 | |
parent | Remove ofp_validate_header() here (diff) | |
download | wireguard-openbsd-c310b5e61497a86c5266b4736c7ffebf41480df6.tar.xz wireguard-openbsd-c310b5e61497a86c5266b4736c7ffebf41480df6.zip |
Link the setuid regress test to the build in a way that the obj
directory gets created. But do not run the test during a global
make regress, as the test puts a setuid binary into the object
directory. Also remove the setuid bit after the test has been run
manually.
OK otto@
-rw-r--r-- | regress/sys/kern/Makefile | 8 | ||||
-rw-r--r-- | regress/sys/kern/setuid/Makefile | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/regress/sys/kern/Makefile b/regress/sys/kern/Makefile index 191c2880d17..070cf85ee1d 100644 --- a/regress/sys/kern/Makefile +++ b/regress/sys/kern/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.66 2016/09/23 18:40:30 otto Exp $ +# $OpenBSD: Makefile,v 1.67 2016/10/05 16:53:34 bluhm Exp $ SUBDIR+= __syscall access accept dup2 dup2_self exec_self execve exit extent SUBDIR+= fchdir @@ -18,6 +18,12 @@ SUBDIR+= sysvshm unalign unfdpass wait SUBDIR+= sig-stop SUBDIR+= unixsock bind +# The setuid subtest creates set user/group id binaries in the obj directory. +# Do not run this test by default, it may trigger alerts from daily security. +.ifmake clean || cleandir || depend || obj +SUBDIR+= setuid +.endif + install: .include <bsd.subdir.mk> diff --git a/regress/sys/kern/setuid/Makefile b/regress/sys/kern/setuid/Makefile index 2124c1aca8f..aad454875d6 100644 --- a/regress/sys/kern/setuid/Makefile +++ b/regress/sys/kern/setuid/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2016/10/03 12:06:43 bluhm Exp $ +# $OpenBSD: Makefile,v 1.3 2016/10/05 16:53:34 bluhm Exp $ MOUNT_NOSUID != mount | grep ^$$(df -P . | tail -1 | awk '{ print $$1 }') | \ grep nosuid || true @@ -123,3 +123,8 @@ sgidexec-install: sgidexec sgidexec_none sgidexec_inherit setresgid_real_exec se ${SUDO} chmod 2555 ./sgidexec .include <bsd.regress.mk> + +.ifmake all || regress +.END: + ${SUDO} chmod 0555 ./suidexec ./sgidexec +.endif |