aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSeebs <seebs@seebs.net>2018-03-30 16:45:19 -0500
committerSeebs <seebs@seebs.net>2018-03-30 16:45:19 -0500
commitf0fa9fba3c53bf4f87f33b47a583cb031b962d34 (patch)
tree6d1c1391e47295465759d4e2292c2ce910d3c255 /test
parentcc6b2008646318c01153d39fef191da3e35a5fc8 (diff)
downloadpseudo-f0fa9fba3c53bf4f87f33b47a583cb031b962d34.tar.gz
pseudo-f0fa9fba3c53bf4f87f33b47a583cb031b962d34.tar.bz2
pseudo-f0fa9fba3c53bf4f87f33b47a583cb031b962d34.zip
Fix sticky bits and a couple of test cases.
Merge fixes from Richard Tollerton and associated test cases and permissions fixes. Signed-off-by: Seebs <seebs@seebs.net>
Diffstat (limited to 'test')
-rwxr-xr-xtest/test-cp-setuid.sh23
-rwxr-xr-x[-rw-r--r--]test/test-tclsh-fork.sh0
2 files changed, 23 insertions, 0 deletions
diff --git a/test/test-cp-setuid.sh b/test/test-cp-setuid.sh
new file mode 100755
index 0000000..cdb2cd3
--- /dev/null
+++ b/test/test-cp-setuid.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+# Verify that special bits (setuid/setgid/sticky) are preserved.
+#
+# Return vals:
+#
+# 2 - Incorrect permissions
+# All other nonzero - Unexpected command error
+# 0 - Pass
+
+trap "rm -rf d1 d2" EXIT
+
+mkdir d1
+chmod 7777 d1
+cp -Rp d1 d2
+perms=`ls -od d1 d2 | cut -c 1-10 | uniq`
+if [ "$perms" != drwsrwsrwt ]; then
+ exit 2
+fi
+
+
+exit 0
diff --git a/test/test-tclsh-fork.sh b/test/test-tclsh-fork.sh
index e9dec66..e9dec66 100644..100755
--- a/test/test-tclsh-fork.sh
+++ b/test/test-tclsh-fork.sh