From 692c7e430c341da68c1bb081aae0563647a31a26 Mon Sep 17 00:00:00 2001 From: thib Date: Sat, 12 Mar 2005 12:37:30 +0000 Subject: [PATCH] fixed bug : always restore umask, even if fcron run unprivileged --- job.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/job.c b/job.c index 9419312..74c5aa6 100644 --- a/job.c +++ b/job.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: job.c,v 1.62 2005-02-26 15:09:25 thib Exp $ */ + /* $Id: job.c,v 1.63 2005-03-12 12:37:30 thib Exp $ */ #include "fcron.h" @@ -96,9 +96,6 @@ change_user(struct cl_t *cl) const char * const * env; #endif - /* First, restore umask to default */ - umask (saved_umask); - /* Obtain password entry and change privileges */ if ((pas = getpwnam(cl->cl_runas)) == NULL) @@ -293,6 +290,9 @@ run_job(struct exe_t *exeent) die_e("could not pipe()"); } + /* First, restore umask to default */ + umask (saved_umask); + #ifndef RUN_NON_PRIVILEGED if (change_user(line) < 0) return ; -- 2.40.0