aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2023-06-12 10:58:39 -0400
committerMike Gilbert <floppym@gentoo.org>2023-06-12 12:00:04 -0400
commitcdc89a00ac0bc3170d4ca7bfc77bc2572ce076b0 (patch)
treea54daaf153a5ff7356735a4160112f425deb5c12 /tests
parentbuild: Fix libc path configure test for mold (diff)
downloadsandbox-cdc89a00ac0bc3170d4ca7bfc77bc2572ce076b0.tar.gz
sandbox-cdc89a00ac0bc3170d4ca7bfc77bc2572ce076b0.tar.bz2
sandbox-cdc89a00ac0bc3170d4ca7bfc77bc2572ce076b0.zip
libsandbox: add lutimes to symlink_func
lutimes operates on symlinks, so we should not check for access against the symlink target. Bug: https://bugs.gentoo.org/908105 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/lutimes-1.sh9
-rw-r--r--tests/lutimes.at1
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/lutimes-1.sh b/tests/lutimes-1.sh
new file mode 100755
index 0000000..8638bb2
--- /dev/null
+++ b/tests/lutimes-1.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+addwrite "${PWD}"
+
+sym="lutimes-1.sym"
+ln -s /bad/path "${sym}"
+
+lutimes-0 0 "${sym}" NULL || exit 1
+lutimes-0 -1,EACCES /bin/sh NULL || exit 1
diff --git a/tests/lutimes.at b/tests/lutimes.at
new file mode 100644
index 0000000..081d7d2
--- /dev/null
+++ b/tests/lutimes.at
@@ -0,0 +1 @@
+SB_CHECK(1)