diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-10-05 16:53:35 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-10-05 16:53:35 +0000 |
commit | 98e35f79c600266ab0666c4606d9cfab1da4ea95 (patch) | |
tree | d6cf7503c08f79746bf61d691857589831239f11 | |
parent | 5e3f027111aa5afc6261494ac5ff67f3f4bd8292 (diff) |
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 |