FAIL_EXIT1 ("symlink link1-bad failed");
if (symlink ("link2-tgt", "link2-ok") < 0)
FAIL_EXIT1 ("symlink link2-ok failed");
- if (open ("link2-tgt", O_RDWR|O_CREAT, 0777) < 0)
+ if (open ("link2-tgt", O_RDWR|O_CREAT, 0666) < 0)
FAIL_EXIT1 ("create of link2-tgt failed");
/* Now we run the tests. */
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. */
debug;
if (td->fname)
- td->fd = xopen (td->fname, O_WRONLY, 0777);
+ td->fd = xopen (td->fname, O_WRONLY, 0666);
fd = td->fd;
while (1)
debug;
if (td->fname)
- td->fd = xopen (td->fname, O_RDONLY, 0777);
+ td->fd = xopen (td->fname, O_RDONLY, 0666);
fd = td->fd;
while (1)
break;
case test_stream_fdopen_w:
- fd = xopen (fname, O_WRONLY|O_CREAT|O_TRUNC, 0777);
+ fd = xopen (fname, O_WRONLY|O_CREAT|O_TRUNC, 0666);
fp = fdopen (fd, "w");
break;
# include <support/test-driver.c>
#endif
-
int has_dir = mkdir ("doesExist", 0777) == 0;
- int fd = has_dir ? creat ("doesExist/someFile", 0777) : -1;
+ int fd = has_dir ? creat ("doesExist/someFile", 0666) : -1;
for (i = 0; i < (int) (sizeof (tests) / sizeof (tests[0])); ++i)
{
{
if (strcmp (argv[i], "<") == 0 && argv[i + 1])
{
- new_stdin = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0777);
+ new_stdin = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0666);
++i;
continue;
}
if (strcmp (argv[i], ">") == 0 && argv[i + 1])
{
- new_stdout = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0777);
+ new_stdout = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0666);
++i;
continue;
}
if (strcmp (argv[i], ">>") == 0 && argv[i + 1])
{
- new_stdout = open (argv[i + 1], O_WRONLY|O_CREAT|O_APPEND, 0777);
+ new_stdout = open (argv[i + 1], O_WRONLY|O_CREAT|O_APPEND, 0666);
++i;
continue;
}
if (strcmp (argv[i], "2>") == 0 && argv[i + 1])
{
- new_stderr = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0777);
+ new_stderr = open (argv[i + 1], O_WRONLY|O_CREAT|O_TRUNC, 0666);
++i;
continue;
}
{
int fd;
fd = open (concat (new_root_path, "/dev/", which, NULL),
- O_CREAT | O_TRUNC | O_RDWR, 0777);
+ O_CREAT | O_TRUNC | O_RDWR, 0666);
xclose (fd);
trymount (concat ("/dev/", which, NULL),