Move call to umask(0) back into pw_util(), because the latter
function is also used by chpass(1) and passwd(1).
This commit is contained in:
parent
bc3101cc77
commit
9d1163f7c3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48328
@ -36,7 +36,7 @@
|
|||||||
static const char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94";
|
static const char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -103,6 +103,9 @@ pw_init()
|
|||||||
(void)signal(SIGQUIT, SIG_IGN);
|
(void)signal(SIGQUIT, SIG_IGN);
|
||||||
(void)signal(SIGTERM, SIG_IGN);
|
(void)signal(SIGTERM, SIG_IGN);
|
||||||
(void)signal(SIGCONT, pw_cont);
|
(void)signal(SIGCONT, pw_cont);
|
||||||
|
|
||||||
|
/* Create with exact permissions. */
|
||||||
|
(void)umask(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
static const char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94";
|
static const char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -103,6 +103,9 @@ pw_init()
|
|||||||
(void)signal(SIGQUIT, SIG_IGN);
|
(void)signal(SIGQUIT, SIG_IGN);
|
||||||
(void)signal(SIGTERM, SIG_IGN);
|
(void)signal(SIGTERM, SIG_IGN);
|
||||||
(void)signal(SIGCONT, pw_cont);
|
(void)signal(SIGCONT, pw_cont);
|
||||||
|
|
||||||
|
/* Create with exact permissions. */
|
||||||
|
(void)umask(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -42,7 +42,7 @@ static const char copyright[] =
|
|||||||
static char sccsid[] = "@(#)vipw.c 8.3 (Berkeley) 4/2/94";
|
static char sccsid[] = "@(#)vipw.c 8.3 (Berkeley) 4/2/94";
|
||||||
#endif
|
#endif
|
||||||
static const char rcsid[] =
|
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 */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -100,8 +100,6 @@ main(argc, argv)
|
|||||||
usage();
|
usage();
|
||||||
|
|
||||||
pw_init();
|
pw_init();
|
||||||
/* Create with exact permissions. */
|
|
||||||
(void)umask(0);
|
|
||||||
pfd = pw_lock();
|
pfd = pw_lock();
|
||||||
tfd = pw_tmp();
|
tfd = pw_tmp();
|
||||||
copyfile(pfd, tfd);
|
copyfile(pfd, tfd);
|
||||||
|
Loading…
Reference in New Issue
Block a user