|
|
1.1 root 1: /*
2: * cron.h
3: */
4: #define VERSION "3.2" /* Ignore junk file in /usr/spool/cron/crontabs
5: * Restored make dependencies. 9-11-92
6: */
7:
8: /* 3.1 Do fork only to execute next job 2-28-92
9: * opendir took out from the main loop.
10: * check FIFO before cron bacame a daemon.
11: * Minor bugs fixed.
12: */
13: /* 1.3 Beta Cron will not die when cannot fork 2-26-92
14: * 1.2 Beta Added stuff to be a real deamon.
15: */
16: #include <sys/types.h>
17: /*
18: * File's and directory's definitions.
19: */
20: #define D_MAIN "/usr/lib/cron" /* main cron directory */
21: #define D_SPOOL "/usr/spool/cron/crontabs" /* spool area */
22: #define F_LOG "/usr/lib/cron/log" /* accounting information */
23: #define F_LOCK "/usr/lib/cron/FIFO" /* lock file (named pipe) */
24: #define F_DENY "/usr/lib/cron/cron.deny" /* list of denied users */
25: #define F_ALLOW "/usr/lib/cron/cron.allow" /* list of allowed users */
26: #define F_LOCK "/usr/lib/cron/FIFO" /* Lock pipe */
27: #define F_DEF "/etc/default/cron" /* user config. file */
28:
29: /* Old crontab entry. We will use it for the backword compatibility. */
30: #define F_CRON "/usr/lib/crontab"
31:
32: #define MAX_UNAME 21 /* Maximum user name */
33: #define MAX_STR_LEN 512 /* Maximum length of the command line */
34:
35:
36: #if DEBUG
37: # define Dprint(x,y) printf((x),(y));
38: #else
39: # define Dprint(x,y) ;
40: #endif
41:
42: #define TRUE 1
43: #define FALSE 0
44: #define DAEMON "daemon"
45:
46: extern char *malloc();
47:
48: /*
49: * We want to keep track about children.
50: */
51: typedef struct _child_id {
52: struct _child_id *next, *prev; /* links */
53: int pid; /* Process ID */
54: char name[MAX_UNAME]; /* User name */
55: time_t time; /* Time */
56: char command[1]; /* Command */
57: } child_id;
58:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.