* `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__
/* fcron.c */
extern void xexit(int exit_value);
-#include "log.h"
-#include "subs.h"
#include "database.h"
#include "conf.h"
#include "job.h"
* `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
#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);
pid_t read_pid(void);
+/* used in temp_file() */
+char *tmp_path = "/tmp/";
+
/* command line options */
char rm_opt = 0;
char list_opt = 0;
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;
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);
}
* `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"