From 1567a8d678998ecaebac987957d5fd84915a9a7c Mon Sep 17 00:00:00 2001 From: Thibault Godouet Date: Sat, 10 Feb 2001 12:53:29 +0000 Subject: [PATCH] bug corrected : current dir was not set correctly --- fcrontab.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fcrontab.c b/fcrontab.c index c9a0650..5963a71 100644 --- a/fcrontab.c +++ b/fcrontab.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcrontab.c,v 1.29 2001-01-12 21:41:24 thib Exp $ */ + /* $Id: fcrontab.c,v 1.30 2001-02-10 12:53:29 thib Exp $ */ /* * The goal of this program is simple : giving a user interface to fcron @@ -42,7 +42,7 @@ #include "fcrontab.h" -char rcs_info[] = "$Id: fcrontab.c,v 1.29 2001-01-12 21:41:24 thib Exp $"; +char rcs_info[] = "$Id: fcrontab.c,v 1.30 2001-02-10 12:53:29 thib Exp $"; void info(void); void usage(void); @@ -809,6 +809,10 @@ main(int argc, char **argv) uid = getuid(); + /* get current dir */ + if ( (orig_dir = getcwd(NULL, 0)) == NULL ) + error_e("getcwd"); + /* interpret command line options */ parseopt(argc, argv); @@ -851,10 +855,6 @@ main(int argc, char **argv) * to 600 for security reasons */ umask(026); - /* get current dir */ - if ( (orig_dir = getcwd(NULL, 0)) == NULL ) - error_e("getcwd"); - snprintf(buf, sizeof(buf), "%s.orig", user); /* determine what action should be taken */ -- 2.47.3