Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 276525
Collapse All | Expand All

(-)vixie-cron-4.1/database.c (-4 / +4 lines)
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);
(-)vixie-cron-4.1/pathnames.h (+7 lines)
Lines 48-53 Link Here
48
			 */
48
			 */
49
#define SPOOL_DIR	"crontabs"
49
#define SPOOL_DIR	"crontabs"
50
50
51
			/*
52
			 * CRON_D_DIR is a directory with files parsed like
53
			 * crontab. Whenever one of it's files changes it gets
54
			 * reloaded.
55
			 */
56
#define CRON_D_DIR	"/etc/cron.d"
57
51
			/* cron allow/deny file.  At least cron.deny must
58
			/* cron allow/deny file.  At least cron.deny must
52
			 * exist for ordinary users to run crontab.
59
			 * exist for ordinary users to run crontab.
53
			 */
60
			 */

Return to bug 276525