From: oetiker Date: Wed, 3 Apr 2002 05:32:31 +0000 (+0000) Subject: i suck. sorry. add ,0666 to the open(). -- Paul Vixie X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d9c61cbfa385872be3a7115e5be629e1ce6ff4cd;p=rrdtool-all.git i suck. sorry. add ,0666 to the open(). -- Paul Vixie git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@113 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/program/src/rrd_restore.c b/program/src/rrd_restore.c index 770e22f2..e24cc8e9 100644 --- a/program/src/rrd_restore.c +++ b/program/src/rrd_restore.c @@ -407,7 +407,7 @@ rrd_write(char *file_name, rrd_t *rrd) if (strcmp("-",file_name)==0){ *rrd_file= *stdout; } else { - int fd = open(file_name,O_RDWR|O_CREAT|O_EXCL); + int fd = open(file_name,O_RDWR|O_CREAT|O_EXCL,0666); if (fd == -1 || (rrd_file = fdopen(fd,"wb")) == NULL) { rrd_set_error("creating '%s': %s",file_name,strerror(errno)); rrd_free(rrd);