summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-01-09 15:04:52 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-01-09 15:07:29 -0500
commitae94cdc00136685abe61d55e1e357caaa636d785 (patch)
tree8eeea3b9a1dd65ad13c85502a4bde46be2964d59
parentd39d6999a78747f8048fd57e2ca3143c81c53537 (diff)
downloadbfs-ae94cdc00136685abe61d55e1e357caaa636d785.tar.xz
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
-rw-r--r--tests/stddirs.sh5
1 files 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*