aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-03-08 07:35:32 -0400
committerMike Frysinger <vapier@gentoo.org>2009-03-08 09:11:14 -0400
commitd4dee0ebe39627e9d3b90c312f770d7ba73a46f5 (patch)
treeb5613010981c5561febfd3b6dd07076b375a5364 /tests/lchown-1.sh
parentlibsandbox: handle symlinks properly (diff)
downloadsandbox-d4dee0ebe39627e9d3b90c312f770d7ba73a46f5.tar.gz
sandbox-d4dee0ebe39627e9d3b90c312f770d7ba73a46f5.tar.bz2
sandbox-d4dee0ebe39627e9d3b90c312f770d7ba73a46f5.zip
tests: add symlink tests and unify code
Add test cases for symlink behavior and unify some of the test code to make adding more test cases even easier. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'tests/lchown-1.sh')
-rwxr-xr-xtests/lchown-1.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/lchown-1.sh b/tests/lchown-1.sh
new file mode 100755
index 0000000..c7cc4a4
--- /dev/null
+++ b/tests/lchown-1.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# make sure symlinks with lchown() work properly
+
+addwrite $PWD
+
+rm -rf deny link
+mkdir deny
+touch deny/file
+ln -s deny/file link
+
+adddeny $PWD/deny
+
+# this should not fail
+exec lchown-0 0 link ${SB_UID} ${SB_GID}