Hahnfeld created this revision.
Hahnfeld added a reviewer: EricWF.
Hahnfeld added a subscriber: cfe-commits.

man page for mkdir says: `If the parent directory has the set-group-ID bit set, 
then so will the newly created directory.`

http://reviews.llvm.org/D22265

Files:
  
test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp

Index: 
test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
===================================================================
--- 
test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
+++ 
test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
@@ -60,6 +60,9 @@
 TEST_CASE(create_directory_one_level)
 {
     scoped_test_env env;
+    // Remove setgid which mkdir would inherit
+    permissions(env.test_root, perms::remove_perms | perms::set_gid);
+
     const path dir = env.make_env_path("dir1");
     const path attr_dir = env.create_dir("dir2");
     permissions(attr_dir, perms::none);


Index: test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
===================================================================
--- test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
+++ test/std/experimental/filesystem/fs.op.funcs/fs.op.create_directory/create_directory_with_attributes.pass.cpp
@@ -60,6 +60,9 @@
 TEST_CASE(create_directory_one_level)
 {
     scoped_test_env env;
+    // Remove setgid which mkdir would inherit
+    permissions(env.test_root, perms::remove_perms | perms::set_gid);
+
     const path dir = env.make_env_path("dir1");
     const path attr_dir = env.create_dir("dir2");
     permissions(attr_dir, perms::none);
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to