From: Jim Meyering Date: Mon, 26 Apr 1999 13:03:49 +0000 (+0000) Subject: (main): Use proper mode_t types and macros. X-Git-Tag: SH-UTILS-1_16h~38 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=157b3ef61f919764963bb6cbfc4b25764bb28a4c;p=thirdparty%2Fcoreutils.git (main): Use proper mode_t types and macros. Don't assume the traditional Unix values for mode bits. --- diff --git a/src/dd.c b/src/dd.c index 4e8a380a76..eebd2143e0 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