summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2017-10-26 20:16:17 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2017-12-16 20:41:26 +0000
commitb94246b28297368cb8276555e75fe5ed064d9f45 (patch)
treeced8051cdc670aead8db4c0bbabc19cd0e1cac62
parentImprove permissions tests on mknod (diff)
downloadnetfs-b94246b28297368cb8276555e75fe5ed064d9f45.tar.bz2
netfs-b94246b28297368cb8276555e75fe5ed064d9f45.tar.xz
netfs-b94246b28297368cb8276555e75fe5ed064d9f45.zip
Improve permissions tests on symlink
-rw-r--r--netfs/unittests/testCore.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp
index 3e64d40..4b12871 100644
--- a/netfs/unittests/testCore.cpp
+++ b/netfs/unittests/testCore.cpp
@@ -287,6 +287,9 @@ BOOST_AUTO_TEST_CASE( symlinks )
BOOST_REQUIRE_EQUAL("/test2", buf);
BOOST_REQUIRE_EQUAL(fuse->unlink("/test3"), 0);
BOOST_REQUIRE_EQUAL(fuse->unlink("/test3"), -ENOENT);
+ disableWriteOnDir(fuse, "/");
+ BOOST_REQUIRE_EQUAL(fuse->symlink("/test2", "/test3"), -EACCES);
+ enableWriteOnDir(fuse, "/");
}
BOOST_AUTO_TEST_CASE( access )