summaryrefslogtreecommitdiff
path: root/src/dd.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-04-26 13:03:49 +0000
committerJim Meyering <jim@meyering.net>1999-04-26 13:03:49 +0000
commit157b3ef61f919764963bb6cbfc4b25764bb28a4c (patch)
treef452083980d78ea1fc3688d5ff5f434346ed5f5b /src/dd.c
parent73e540ea1b67f8a4a2da4c5e22125d487e01c98f (diff)
downloadcoreutils-157b3ef61f919764963bb6cbfc4b25764bb28a4c.tar.xz
(main): Use proper mode_t types and macros.
Don't assume the traditional Unix values for mode bits.
Diffstat (limited to 'src/dd.c')
-rw-r--r--src/dd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dd.c b/src/dd.c
index 4e8a380a7..eebd2143e 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -1049,7 +1049,10 @@ main (int argc, char **argv)
if (seek_record == 0 && !(conversions_mask & C_NOTRUNC))
omode |= O_TRUNC;
- output_fd = open (output_file, omode, 0666);
+ output_fd = open (output_file, omode,
+ (S_IRUSR | S_IWUSR
+ | S_IRGRP | S_IWGRP
+ | S_IROTH | S_IWOTH));
if (output_fd < 0)
error (1, errno, "%s", output_file);
#if HAVE_FTRUNCATE