summaryrefslogtreecommitdiff
path: root/usr.sbin/vipw
diff options
context:
space:
mode:
authorPierre Beyssac <pb@FreeBSD.org>1999-06-29 01:04:10 +0000
committerPierre Beyssac <pb@FreeBSD.org>1999-06-29 01:04:10 +0000
commit9d1163f7c310b5937dad3f7ff37dc6fdbdd2ec2b (patch)
treed6534194bee20b07a85140d24ff9d6de1be92441 /usr.sbin/vipw
parentbc3101cc77e2afa1efb8001262f5a93ac0698cec (diff)
downloadsrc-test2-9d1163f7c310b5937dad3f7ff37dc6fdbdd2ec2b.tar.gz
src-test2-9d1163f7c310b5937dad3f7ff37dc6fdbdd2ec2b.zip
Move call to umask(0) back into pw_util(), because the latter
function is also used by chpass(1) and passwd(1).
Notes
Notes: svn path=/head/; revision=48328
Diffstat (limited to 'usr.sbin/vipw')
-rw-r--r--usr.sbin/vipw/pw_util.c5
-rw-r--r--usr.sbin/vipw/vipw.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/vipw/pw_util.c b/usr.sbin/vipw/pw_util.c
index 5930342229b3..057b8bc37736 100644
--- a/usr.sbin/vipw/pw_util.c
+++ b/usr.sbin/vipw/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.14 1999/06/26 07:16:38 sheldonh Exp $";
+ "$Id: pw_util.c,v 1.15 1999/06/26 12:15:37 pb Exp $";
#endif /* not lint */
/*
@@ -103,6 +103,9 @@ 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
diff --git a/usr.sbin/vipw/vipw.c b/usr.sbin/vipw/vipw.c
index dc04d065bb0d..4ab301745f63 100644
--- a/usr.sbin/vipw/vipw.c
+++ b/usr.sbin/vipw/vipw.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)vipw.c 8.3 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
- "$Id: vipw.c,v 1.7 1999/06/26 10:45:06 sheldonh Exp $";
+ "$Id: vipw.c,v 1.8 1999/06/26 12:15:39 pb Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -100,8 +100,6 @@ main(argc, argv)
usage();
pw_init();
- /* Create with exact permissions. */
- (void)umask(0);
pfd = pw_lock();
tfd = pw_tmp();
copyfile(pfd, tfd);