|
Lines 53-60
load_database(cron_db *old_db) {
Link Here
|
| 53 |
(void) exit(ERROR_EXIT); |
53 |
(void) exit(ERROR_EXIT); |
| 54 |
} |
54 |
} |
| 55 |
|
55 |
|
| 56 |
if (stat("/etc/cron.d", &crond_stat) < OK) { |
56 |
if (stat(CRON_D_DIR, &crond_stat) < OK) { |
| 57 |
log_it("CRON", getpid(), "STAT FAILED", SPOOL_DIR); |
57 |
log_it("CRON", getpid(), "STAT FAILED", CRON_D_DIR); |
| 58 |
(void) exit(ERROR_EXIT); |
58 |
(void) exit(ERROR_EXIT); |
| 59 |
} |
59 |
} |
| 60 |
|
60 |
|
|
Lines 97-103
load_database(cron_db *old_db) {
Link Here
|
| 97 |
|
97 |
|
| 98 |
while (NULL != (dp = readdir(dir))) { |
98 |
while (NULL != (dp = readdir(dir))) { |
| 99 |
char fname[MAXNAMLEN+1], |
99 |
char fname[MAXNAMLEN+1], |
| 100 |
tabname[MAXNAMLEN+1]; |
100 |
tabname[PATH_MAX+1]; |
| 101 |
|
101 |
|
| 102 |
/* avoid file names beginning with ".". this is good |
102 |
/* avoid file names beginning with ".". this is good |
| 103 |
* because we would otherwise waste two guaranteed calls |
103 |
* because we would otherwise waste two guaranteed calls |
|
Lines 113-119
load_database(cron_db *old_db) {
Link Here
|
| 113 |
(void) strncpy(fname, dp->d_name, MAXNAMLEN); |
113 |
(void) strncpy(fname, dp->d_name, MAXNAMLEN); |
| 114 |
snprintf(tabname, MAXNAMLEN+1, "/etc/cron.d/%s", fname); |
114 |
snprintf(tabname, MAXNAMLEN+1, "/etc/cron.d/%s", fname); |
| 115 |
|
115 |
|
| 116 |
process_crontab("root", NULL, tabname, |
116 |
process_crontab("root", tabname, tabname, |
| 117 |
&crond_stat, &new_db, old_db); |
117 |
&crond_stat, &new_db, old_db); |
| 118 |
} |
118 |
} |
| 119 |
closedir(dir); |
119 |
closedir(dir); |