diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-10 17:55:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-03-10 17:55:39 +0000 |
commit | a534f884503c2bcc4872322f7c860c499527f999 (patch) | |
tree | 923805fa01a3d8b240621631016e7da4a94f5eb2 | |
parent | 2edfb2ec096545ead238b776f495e88732f7433f (diff) |
umask manipulation not neccessary
-rw-r--r-- | bin/ed/buf.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/bin/ed/buf.c b/bin/ed/buf.c index 0188b5be984..bb853e9b40c 100644 --- a/bin/ed/buf.c +++ b/bin/ed/buf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buf.c,v 1.6 1996/10/12 19:38:28 millert Exp $ */ +/* $OpenBSD: buf.c,v 1.7 1998/03/10 17:55:38 deraadt Exp $ */ /* $NetBSD: buf.c,v 1.15 1995/04/23 10:07:28 cgd Exp $ */ /* buf.c: This file contains the scratch-file buffer rountines for the @@ -33,7 +33,7 @@ #if 0 static char *rcsid = "@(#)buf.c,v 1.4 1994/02/01 00:34:35 alm Exp"; #else -static char rcsid[] = "$OpenBSD: buf.c,v 1.6 1996/10/12 19:38:28 millert Exp $"; +static char rcsid[] = "$OpenBSD: buf.c,v 1.7 1998/03/10 17:55:38 deraadt Exp $"; #endif #endif /* not lint */ @@ -204,11 +204,9 @@ char sfn[15] = ""; /* scratch file name */ int open_sbuf() { - int u; int fd = -1; isbinary = newline_added = 0; - u = umask(077); strcpy(sfn, "/tmp/ed.XXXXXX"); if ((fd = mkstemp(sfn)) == -1 || (sfp = fdopen(fd, "w+")) == NULL) { @@ -216,10 +214,8 @@ open_sbuf() close(fd); perror(sfn); strcpy(errmsg, "cannot open temp file"); - umask(u); return ERR; } - umask(u); return 0; } |