]> granicus.if.org Git - fcron/commitdiff
*** empty log message ***
authorthib <thib>
Thu, 17 May 2001 00:52:43 +0000 (00:52 +0000)
committerthib <thib>
Thu, 17 May 2001 00:52:43 +0000 (00:52 +0000)
fcron.h
fcrontab.c
fcrontab.h

diff --git a/fcron.h b/fcron.h
index af207b6fa55b57a8917c3a0e0c2ea656242dc26d..fe5ffa921b872eff4c4b0006dd89fda6560c22b3 100644 (file)
--- 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"
index 900bcbbd81824e065731faf7137077e8144412cf..0329b7661285500fb361418ca82f51e473865cd4 100644 (file)
@@ -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);
 
        }
 
index ba81f30b4553622ec60f9747df60f526881d92c5..43662e33b077964ec8fa11ddf3fa0fe9dadfb398 100644 (file)
@@ -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__
 /* 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"