From: Thibault Godouet Date: Thu, 17 May 2001 00:52:43 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: ver2_9_4~340 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf4731fe2f7e95b30d1b3d6fe8c4b4c27c75689c;p=thirdparty%2Ffcron.git *** empty log message *** --- diff --git a/fcron.h b/fcron.h index af207b6..fe5ffa9 100644 --- a/fcron.h +++ b/fcron.h @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.h,v 1.21 2001-05-15 00:45:16 thib Exp $ */ + /* $Id: fcron.h,v 1.22 2001-05-17 00:57:25 thib Exp $ */ #ifndef __FCRON_H__ #define __FCRON_H__ @@ -85,8 +85,6 @@ extern short int lavg_serial_running; /* fcron.c */ extern void xexit(int exit_value); -#include "log.h" -#include "subs.h" #include "database.h" #include "conf.h" #include "job.h" diff --git a/fcrontab.c b/fcrontab.c index 900bcbb..0329b76 100644 --- a/fcrontab.c +++ b/fcrontab.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcrontab.c,v 1.35 2001-05-15 00:44:21 thib Exp $ */ + /* $Id: fcrontab.c,v 1.36 2001-05-17 00:52:43 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.35 2001-05-15 00:44:21 thib Exp $"; +char rcs_info[] = "$Id: fcrontab.c,v 1.36 2001-05-17 00:52:43 thib Exp $"; void info(void); void usage(void); @@ -50,6 +50,9 @@ void sig_daemon(void); pid_t read_pid(void); +/* used in temp_file() */ +char *tmp_path = "/tmp/"; + /* command line options */ char rm_opt = 0; char list_opt = 0; @@ -554,7 +557,7 @@ edit_file(char *buf) int fd = 0; if ( (fd = open(tmp_str, O_RDONLY)) <= 0 || fstat(fd, &st) != 0 || ! S_ISREG(st.st_mode) || - st.st_uid != asuid || st.st_nlink > 1) { + S_ISLNK(st.st.mode) || st.st_uid != asuid || st.st_nlink > 1){ fprintf(stderr, "%s is not a valid regular file.\n", tmp_str); close(fd); goto exiterr; @@ -897,9 +900,9 @@ main(int argc, char **argv) strncpy(file, argv[file_opt], sizeof(file) - 1); if (make_file(file) == OK) - xexit ( EXIT_OK ); + xexit(EXIT_OK); else - xexit ( EXIT_ERR ); + xexit(EXIT_ERR); } diff --git a/fcrontab.h b/fcrontab.h index ba81f30..43662e3 100644 --- a/fcrontab.h +++ b/fcrontab.h @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcrontab.h,v 1.8 2001-05-15 00:44:51 thib Exp $ */ + /* $Id: fcrontab.h,v 1.10 2001-05-17 00:57:24 thib Exp $ */ #ifndef __FCRONTAB_H__ #define __FCRONTAB_H__ @@ -37,11 +37,13 @@ /* global variables */ extern char debug_opt; extern CF *file_base; +extern char *user; +extern uid_t uid; +extern uid_t asuid; +extern uid_t fcrontab_uid; /* prototype definition */ -#include "log.h" -#include "subs.h" #include "allow.h" #include "fileconf.h"