summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-25 01:56:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-25 01:56:15 +0000
commit5fe675db1e6a27390cc1a3aacf896e82053815b8 (patch)
tree6cdb8cc219998b5259f70772710d29e11b18b2d6 /usr.sbin
parent973f7b54534cf84a5e1ca6e5765ab0913d9ca3e8 (diff)
do not need umask for mkstemp
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/cron/crontab.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c
index e485e33f7fe..a3ba67365e1 100644
--- a/usr.sbin/cron/crontab.c
+++ b/usr.sbin/cron/crontab.c
@@ -16,7 +16,7 @@
*/
#if !defined(lint) && !defined(LINT)
-static char rcsid[] = "$Id: crontab.c,v 1.6 1996/11/01 23:27:30 millert Exp $";
+static char rcsid[] = "$Id: crontab.c,v 1.7 1996/12/25 01:56:14 deraadt Exp $";
#endif
/* crontab - install and manage per-user crontab files
@@ -303,7 +303,6 @@ edit_cmd() {
time_t mtime;
WAIT_T waiter;
PID_T pid, xpid;
- mode_t um;
log_it(RealUser, Pid, "BEGIN EDIT", User);
(void) sprintf(n, CRON_TAB(User));
@@ -320,14 +319,12 @@ edit_cmd() {
}
}
- um = umask(077);
(void) sprintf(Filename, "/tmp/crontab.XXXXXXXXXX");
if ((t = mkstemp(Filename)) == -1) {
perror(Filename);
(void) umask(um);
goto fatal;
}
- (void) umask(um);
#ifdef HAS_FCHOWN
if (fchown(t, getuid(), getgid()) < 0) {
#else