summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-09-16 02:32:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-09-16 02:32:35 +0000
commit8b2d23555b5d71b27f72c08d9978eccc3a02fa78 (patch)
treeebd4cad9f3315146d9404593fc74b10bc91dd296 /sbin
parent1ba211e9e7ab7bc9fa7df3a53c21fabf4cefb8cd (diff)
Set umask to be read only by owner until we set real file permissions.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/restore/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/restore/main.c b/sbin/restore/main.c
index f886a4cfd20..153411f9092 100644
--- a/sbin/restore/main.c
+++ b/sbin/restore/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.4 1996/09/01 15:27:29 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.5 1996/09/16 02:32:34 millert Exp $ */
/* $NetBSD: main.c,v 1.11 1996/03/15 22:39:39 scottr Exp $ */
/*
@@ -93,6 +93,9 @@ main(argc, argv)
char *symtbl = "./restoresymtable";
char *p, name[MAXPATHLEN];
+ /* Temp files should *not* be readable. We set permissions later. */
+ (void) umask(077);
+
if (argc < 2)
usage();