diff options
| author | Florian Weimer <fweimer@redhat.com> | 2025-09-01 15:05:16 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2025-09-01 15:12:28 +0200 |
| commit | 54bd776f991f1a228a6bb6d76bf542edd915a0e3 (patch) | |
| tree | babbe74424fc1827e421e423f7bc0fcc061d99b3 /posix | |
| parent | 576976eacc6af024ec17bea7a2247b1a4e31f2dc (diff) | |
Tests: Create files with mode 0666, not 0777 (bug 33171)
Mode 0777 should be used for directories only because it results
in executable entries (after typical umasks are applied).
Reviewed-by: Arjun Shankar <arjun@redhat.com>
Diffstat (limited to 'posix')
| -rw-r--r-- | posix/tst-spawn-chdir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/tst-spawn-chdir.c b/posix/tst-spawn-chdir.c index b97cd3a2d6..1b1323fd6a 100644 --- a/posix/tst-spawn-chdir.c +++ b/posix/tst-spawn-chdir.c @@ -156,13 +156,13 @@ do_test (void) TEST_COMPARE (posix_spawn_file_actions_addopen (&actions, 3, /* Arbitrary unused descriptor. */ "probe-file", - O_WRONLY | O_CREAT | O_EXCL, 0777), 0); + O_WRONLY | O_CREAT | O_EXCL, 0666), 0); TEST_COMPARE (posix_spawn_file_actions_addclose (&actions, 3), 0); /* Run the actual in iteration_directory. */ add_chdir (&actions, "..", do_fchdir, 5); TEST_COMPARE (posix_spawn_file_actions_addopen (&actions, STDOUT_FILENO, "output-file", - O_WRONLY | O_CREAT | O_EXCL, 0777), 0); + O_WRONLY | O_CREAT | O_EXCL, 0666), 0); /* Check that posix_spawn_file_actions_addchdir_np made a copy of the path. */ |
