From 9354546bc9f78ebfd10298d1915bbaa4db266330 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 26 Oct 2017 20:10:40 +0100 Subject: Improve permissions tests on mknod --- netfs/unittests/testCore.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netfs/unittests/testCore.cpp b/netfs/unittests/testCore.cpp index 56c695e..3e64d40 100644 --- a/netfs/unittests/testCore.cpp +++ b/netfs/unittests/testCore.cpp @@ -364,6 +364,9 @@ BOOST_AUTO_TEST_CASE( mknod ) BOOST_REQUIRE_EQUAL(st.st_mode, 0600 | S_IFIFO); BOOST_REQUIRE_EQUAL(fuse->unlink("/nod"), 0); BOOST_REQUIRE_EQUAL(fuse->unlink("/nod"), -ENOENT); + disableWriteOnDir(fuse, "/"); + BOOST_REQUIRE_EQUAL(fuse->mknod("/nod", 0600 | S_IFIFO, 0), -EACCES); + enableWriteOnDir(fuse, "/"); } BOOST_AUTO_TEST_CASE( renameToDir ) -- cgit v1.2.3