summaryrefslogtreecommitdiffstats
path: root/libutil
diff options
context:
space:
mode:
authorPierre Beyssac <pb@FreeBSD.org>1999-06-26 12:15:39 +0000
committerPierre Beyssac <pb@FreeBSD.org>1999-06-26 12:15:39 +0000
commit071cc7aa76c53bf1b1f69b50539da010759022c8 (patch)
tree87f05a1cc13a83a7eff8ee7de7f090448ea285c5 /libutil
parent58f855136d43c7a2d0230149b4738f9d7acd8b31 (diff)
downloadpw-darwin-071cc7aa76c53bf1b1f69b50539da010759022c8.tar.gz
pw-darwin-071cc7aa76c53bf1b1f69b50539da010759022c8.tar.zst
pw-darwin-071cc7aa76c53bf1b1f69b50539da010759022c8.zip
Force umask to 077 (instead of 000) during the edit phase, to get
secure permissions in case the user attempts to save something to a file of his own. Move umask stuff out of pw_init() into main() for better visibility of overall umask tweaking logic. PR: misc/11797
Diffstat (limited to 'libutil')
-rw-r--r--libutil/pw_util.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libutil/pw_util.c b/libutil/pw_util.c
index cdfcc4d..5930342 100644
--- a/libutil/pw_util.c
+++ b/libutil/pw_util.c
@@ -36,7 +36,7 @@
static const char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
- "$Id: pw_util.c,v 1.13 1998/12/13 01:39:32 dillon Exp $";
+ "$Id: pw_util.c,v 1.14 1999/06/26 07:16:38 sheldonh Exp $";
#endif /* not lint */
/*
@@ -103,9 +103,6 @@ pw_init()
(void)signal(SIGQUIT, SIG_IGN);
(void)signal(SIGTERM, SIG_IGN);
(void)signal(SIGCONT, pw_cont);
-
- /* Create with exact permissions. */
- (void)umask(0);
}
int