X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=restore%2Ftape.c;h=d04866de64d6b70437c95d4e3dc830d2dbfc3d0b;hp=d4a46ed78512f21c349ed99cde2d9ec464635bc8;hb=dad15dbdd521ed77fefd0de843f69467d727aade;hpb=41d8bdc06642add2145776e8fd3349765f8306c7 diff --git a/restore/tape.c b/restore/tape.c index d4a46ed..d04866d 100644 --- a/restore/tape.c +++ b/restore/tape.c @@ -46,7 +46,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.29 2001/03/20 10:02:48 stelian Exp $"; + "$Id: tape.c,v 1.30 2001/03/20 20:39:36 stelian Exp $"; #endif /* not lint */ #include @@ -1237,7 +1237,7 @@ comparefile(char *name) panic("cannot delete tmp file %s: %s\n", tmpfile, strerror(errno)); } - if ((ofile = creat(tmpfile, 0600)) < 0) { + if ((ofile = open(tmpfile, O_WRONLY | O_CREAT | O_TRUNC, 0600)) < 0) { panic("cannot create file temp file %s: %s\n", name, strerror(errno)); }