Skip to content

Commit

Permalink
[libcxx][filesystem] Remove setgid from parent before testing permiss…
Browse files Browse the repository at this point in the history
…ions

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

Differential Revision: https://reviews.llvm.org/D22265

llvm-svn: 275760
  • Loading branch information
Jonas Hahnfeld authored and Jonas Hahnfeld committed Jul 18, 2016
1 parent a23470e commit 16be8ee
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -60,6 +60,9 @@ TEST_CASE(create_existing_directory)
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);
Expand Down

0 comments on commit 16be8ee

Please sign in to comment.