projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0eeabb
)
(open_maybe_create): Don't pass 0666 to open; it's not needed and isn't
author
Jim Meyering
<jim@meyering.net>
Mon, 26 Apr 1999 12:47:33 +0000
(12:47 +0000)
committer
Jim Meyering
<jim@meyering.net>
Mon, 26 Apr 1999 12:47:33 +0000
(12:47 +0000)
guaranteed to be portable.
src/touch.c
patch
|
blob
|
history
diff --git
a/src/touch.c
b/src/touch.c
index
7cf1c1b
..
073e42c
100644
(file)
--- 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;