diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2025-10-05 09:19:31 +0100 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2025-10-05 09:19:31 +0100 |
| commit | f85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (patch) | |
| tree | ad799ccacfb459b809b02b9c115ed4befb93b4c1 /sysutils/util-linux/files/patch-tests_functions.sh | |
| parent | 0b1510fe1f98f82da6f3481cb6c58957022d9211 (diff) | |
| parent | b057c68280a2f2a7b3d1fbac36f7b034e1fdf593 (diff) | |
Merge remote-tracking branch 'freebsd/main' into lf/main
Diffstat (limited to 'sysutils/util-linux/files/patch-tests_functions.sh')
| -rw-r--r-- | sysutils/util-linux/files/patch-tests_functions.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sysutils/util-linux/files/patch-tests_functions.sh b/sysutils/util-linux/files/patch-tests_functions.sh new file mode 100644 index 000000000000..c0d2183eb709 --- /dev/null +++ b/sysutils/util-linux/files/patch-tests_functions.sh @@ -0,0 +1,33 @@ +--- tests/functions.sh.orig 2025-06-23 11:25:00 UTC ++++ tests/functions.sh +@@ -479,8 +479,8 @@ function ts_init_suid { + + # Save info about original setting + TS_SUID_PROGS[$ct]=$PROG +- TS_SUID_USER[$ct]=$(stat --printf="%U" $PROG) +- TS_SUID_GROUP[$ct]=$(stat --printf="%G" $PROG) ++ TS_SUID_USER[$ct]=$(stat -f "%Su" $PROG) ++ TS_SUID_GROUP[$ct]=$(stat -f "%Sg" $PROG) + + chown root:root $PROG &> /dev/null + chmod u+s $PROG &> /dev/null +@@ -688,12 +688,13 @@ function ts_cleanup_on_exit { + } + + function ts_cleanup_on_exit { +- +- for idx in $(seq 0 $((${#TS_SUID_PROGS[*]} - 1))); do +- PROG=${TS_SUID_PROGS[$idx]} +- chmod a-s $PROG &> /dev/null +- chown ${TS_SUID_USER[$idx]}:${TS_SUID_GROUP[$idx]} $PROG &> /dev/null +- done ++ if [ ${#TS_SUID_PROGS[*]} -ge 1 ] ; then ++ for idx in $(seq 0 $((${#TS_SUID_PROGS[*]} - 1))); do ++ PROG=${TS_SUID_PROGS[$idx]} ++ chmod a-s $PROG &> /dev/null ++ chown ${TS_SUID_USER[$idx]}:${TS_SUID_GROUP[$idx]} $PROG &> /dev/null ++ done ++ fi + + for dev in "${TS_LOOP_DEVS[@]}"; do + ts_device_deinit "$dev" |
