diff options
author | Jim Meyering <jim@meyering.net> | 1999-04-26 12:47:33 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-04-26 12:47:33 +0000 |
commit | ebb207dc5a922631bd9d9177f19538129d7fcefa (patch) | |
tree | 19f95882ed9c0b9c057facf3caa38463f5f229e3 /src | |
parent | d0eeabbc32898e5640941b36b92e5060ebf03dd0 (diff) | |
download | coreutils-ebb207dc5a922631bd9d9177f19538129d7fcefa.tar.xz |
(open_maybe_create): Don't pass 0666 to open; it's not needed and isn't
guaranteed to be portable.
Diffstat (limited to 'src')
-rw-r--r-- | src/touch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/touch.c b/src/touch.c index 7cf1c1b3f..073e42cf2 100644 --- a/src/touch.c +++ b/src/touch.c @@ -115,7 +115,8 @@ open_maybe_create (const char *file, int *file_created) while (1) { /* First, see if we can create a new FILE. */ - fd = open (file, O_WRONLY | O_CREAT | O_EXCL, 0666); + fd = open (file, O_WRONLY | O_CREAT | O_EXCL, + S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); if (fd != -1) *file_created = 1; |