* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: fcronsighup.c,v 1.3 2001-12-23 22:03:08 thib Exp $ */
+ /* $Id: fcronsighup.c,v 1.4 2002-02-25 18:37:36 thib Exp $ */
#include "global.h"
#include "subs.h"
#include "allow.h"
-char rcs_info[] = "$Id: fcronsighup.c,v 1.3 2001-12-23 22:03:08 thib Exp $";
+char rcs_info[] = "$Id: fcronsighup.c,v 1.4 2002-02-25 18:37:36 thib Exp $";
void usage(void);
void sig_daemon(void);
uid_t uid = 0;
-/* used in temp_file() */
-char *tmp_path = "/tmp/";
-
#ifdef DEBUG
char debug_opt = 1; /* set to 1 if we are in debug mode */
#else
/* needed by log part : */
char *prog_name = NULL;
char foreground = 1;
+char dosyslog = 1;
pid_t daemon_pid = 0;
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: fcrontab.c,v 1.54 2002-02-02 14:51:36 thib Exp $ */
+ /* $Id: fcrontab.c,v 1.55 2002-02-25 18:40:40 thib Exp $ */
/*
* The goal of this program is simple : giving a user interface to fcron
#include "allow.h"
#include "fileconf.h"
+#include "temp_file.h"
-char rcs_info[] = "$Id: fcrontab.c,v 1.54 2002-02-02 14:51:36 thib Exp $";
+char rcs_info[] = "$Id: fcrontab.c,v 1.55 2002-02-25 18:40:40 thib Exp $";
void info(void);
void usage(void);
/* needed by log part : */
char *prog_name = NULL;
char foreground = 1;
+char dosyslog = 1;
pid_t daemon_pid = 0;
#ifdef HAVE_LIBPAM
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: fcrontab.h,v 1.13 2001-12-23 22:04:30 thib Exp $ */
+ /* $Id: fcrontab.h,v 1.14 2002-02-25 18:40:51 thib Exp $ */
#ifndef __FCRONTAB_H__
#define __FCRONTAB_H__
/* global variables */
extern char debug_opt;
+extern char dosyslog;
extern struct CF *file_base;
extern char *user;
extern uid_t uid;
* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: log.c,v 1.11 2001-12-23 22:03:58 thib Exp $ */
+ /* $Id: log.c,v 1.12 2002-02-25 18:38:38 thib Exp $ */
/* This code is inspired by Anacron's sources of
Itai Tzur <itzur@actcom.co.il> */
if ( (msg = make_msg(fmt, args)) == NULL)
return;
- xopenlog();
- syslog(priority, "%s", msg);
+ if (dosyslog) {
+ xopenlog();
+ syslog(priority, "%s", msg);
+ }
if (foreground == 1) {
time_t t = time(NULL);
if ( (msg = make_msg(fmt, args)) == NULL )
return ;
- xopenlog();
- syslog(priority, "%s: %s", msg, strerror(saved_errno));
+ if ( dosyslog ) {
+ xopenlog();
+ syslog(priority, "%s: %s", msg, strerror(saved_errno));
+ }
if (foreground == 1) {
time_t t = time(NULL);