From 157b3ef61f919764963bb6cbfc4b25764bb28a4c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 26 Apr 1999 13:03:49 +0000 Subject: [PATCH] (main): Use proper mode_t types and macros. Don't assume the traditional Unix values for mode bits. --- src/dd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dd.c b/src/dd.c index 4e8a380..eebd214 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 -- 2.7.4