acquire_daemonlock(0);
set_cron_uid();
- set_cron_cwd();
+ check_spool_dir();
if (putenv("PATH=" _PATH_DEFPATH) < 0) {
log_it("CRON", pid, "DEATH", "can't putenv PATH", errno);
argv[1] = n;
}
parse_args(argc, argv); /* sets many globals, opens a file */
- set_cron_cwd();
+ check_spool_dir();
if (!allowed(RealUser, CRON_ALLOW, CRON_DENY)) {
fprintf(stderr,
"You (%s) are not allowed to use this program (%s)\n",
}
if (Option == opt_replace) {
- /* we have to open the file here because we're going to
- * chdir(2) into /var/cron before we get around to
- * reading the file.
- */
if (!strcmp(Filename, "-"))
NewCrontab = stdin;
else {
#endif
}
-void set_cron_cwd(void) {
+void check_spool_dir(void) {
struct stat sb;
struct group *grp = NULL;