From: zhuk Date: Tue, 30 May 2017 20:46:03 +0000 (+0000) Subject: First pass to make bluhm@ happy regarding doas regress conf. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c52384588f7cb85c5d9f106573091eef66991ed5;p=openbsd First pass to make bluhm@ happy regarding doas regress conf. 1. Make permit tests use wsrc instead of wobj (because basically, to run test you need obj being writable, unless you want to pollute /usr/src); 2. Test if current user is in wobj group prior running the test, and skip the test if he is not. --- diff --git a/regress/usr.bin/doas/Makefile b/regress/usr.bin/doas/Makefile index 0f717f18778..9a0e854546b 100644 --- a/regress/usr.bin/doas/Makefile +++ b/regress/usr.bin/doas/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2015/07/28 12:25:27 zhuk Exp $ +# $OpenBSD: Makefile,v 1.4 2017/05/30 20:46:03 zhuk Exp $ REGRESS_TARGETS = \ t-okay \ @@ -41,7 +41,8 @@ ${t}: .for t in ${REGRESS_TARGETS:M*-permit*} ${t}: @echo '$@' - @rv=true; \ + @id | grep '(wobj)' >/dev/null || { echo SKIPPED; exit 0; } ; \ + rv=true; \ while read ident cmdline; do \ read expected; \ set +e; \ diff --git a/regress/usr.bin/doas/t-permit-1.conf b/regress/usr.bin/doas/t-permit-1.conf index 6a51afbe4f9..ed0e1082097 100644 --- a/regress/usr.bin/doas/t-permit-1.conf +++ b/regress/usr.bin/doas/t-permit-1.conf @@ -1,3 +1,3 @@ -permit :wsrc as root cmd echo args la-la-la -permit :wsrc as operator cmd echo args -permit nopass :wsrc as www cmd echo args slackers +permit :wobj as root cmd echo args la-la-la +permit :wobj as operator cmd echo args +permit nopass :wobj as www cmd echo args slackers