From 5fe675db1e6a27390cc1a3aacf896e82053815b8 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 25 Dec 1996 01:56:15 +0000 Subject: do not need umask for mkstemp --- usr.sbin/cron/crontab.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'usr.sbin/cron') 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 -- cgit v1.2.3