diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2002-08-08 09:25:14 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2002-08-08 09:25:14 +0000 |
commit | 9d643ec9f55e642bf8873b71559368b2d6df1ecc (patch) | |
tree | 2166baccf02bf8c0235ef97056472d1b8c59c4f4 /usr.sbin/afs | |
parent | 30cde6655aefaf43b1061137c671effd3a148fce (diff) |
Use open() with proper 3rd arg. From arla cvs. miod@ ok.
Diffstat (limited to 'usr.sbin/afs')
-rw-r--r-- | usr.sbin/afs/src/arlad/darla.c | 2 | ||||
-rw-r--r-- | usr.sbin/afs/src/arlad/reconnect.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/afs/src/arlad/darla.c b/usr.sbin/afs/src/arlad/darla.c index 0c41eef72d1..fc565b621ec 100644 --- a/usr.sbin/afs/src/arlad/darla.c +++ b/usr.sbin/afs/src/arlad/darla.c @@ -36,7 +36,7 @@ int DARLA_Open(DARLA_file *Dfp, char *fname, int oflag) int fd; - fd = open(fname, oflag); + fd = open(fname, oflag, 0600); arla_log(ADEBMISC, "DARLA_Open: errno=%d", errno); if (fd > 0) { diff --git a/usr.sbin/afs/src/arlad/reconnect.c b/usr.sbin/afs/src/arlad/reconnect.c index 4c4805bc55e..56476fc23a2 100644 --- a/usr.sbin/afs/src/arlad/reconnect.c +++ b/usr.sbin/afs/src/arlad/reconnect.c @@ -1063,7 +1063,7 @@ copy_cached_file(int from, int to) snprintf (name_to, sizeof(name_to), "%04X", to); fd_from = open(name_from,O_RDONLY | O_BINARY); - fd_to = open(name_to, O_WRONLY | O_CREAT | O_BINARY); + fd_to = open(name_to, O_WRONLY | O_CREAT | O_BINARY | O_TRUNC, 0600); while((n = read(fd_from, buf, BUFSIZE)) > 0) write(fd_to, buf, n); |