From f2d86b1cc21a78a9aeaa6edd83ff8b233358d4e9 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 25 Dec 1996 01:56:14 +0000 Subject: [PATCH] do not need umask for mkstemp --- usr.sbin/cron/crontab.c | 5 +---- 1 file changed, 1 insertion(+), 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 -- 2.20.1