From ae94cdc00136685abe61d55e1e357caaa636d785 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 9 Jan 2024 15:04:52 -0500 Subject: tests: Don't do chmod +s POSIX says > When using the symbolic mode form on a regular file, it is > implementation-defined whether or not: > > - Requests to set the set-user-ID-on-execution or set-group-ID-on- > execution bit when all execute bits are currently clear and none > are being set are ignored. And indeed, illumos ignores them with a warning: chmod: WARNING: /tmp/bfs.XXXX7KaGWb/rainbow/suid: Execute permission required for set-ID on execution Link: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/chmod.html --- tests/stddirs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/stddirs.sh b/tests/stddirs.sh index a51c878..e08e6bf 100644 --- a/tests/stddirs.sh +++ b/tests/stddirs.sh @@ -106,8 +106,9 @@ make_rainbow() { ln -s nowhere "$1/broken" "$MKSOCK" "$1/socket" "$XTOUCH" -p "$1"/s{u,g,ug}id - chmod u+s "$1"/su{,g}id - chmod g+s "$1"/s{u,}gid + chmod 06644 "$1"/sugid + chmod 04644 "$1"/suid + chmod 02644 "$1"/sgid mkdir "$1/ow" "$1"/sticky{,_ow} chmod o+w "$1"/*ow chmod +t "$1"/sticky* -- cgit v1.2.3