From: Tomas Janousek Date: Mon, 27 Aug 2007 11:01:50 +0000 (+0200) Subject: Revert "System table wasn't sometimes checked for changes." X-Git-Tag: v4.2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b321a66c2731c0684c2b7fe5b1c2251dc2c72f4;p=cronie Revert "System table wasn't sometimes checked for changes." This reverts commit b18c0c9a01bef691c7b696709cd2f9736ba98a82. Signed-off-by: Tomas Janousek --- diff --git a/src/misc.c b/src/misc.c index 862147c..2de5102 100644 --- a/src/misc.c +++ b/src/misc.c @@ -270,37 +270,6 @@ set_cron_cwd(void) { exit(ERROR_EXIT); } } - /* now check the RH_CROND_DIR */ - if (stat(RH_CROND_DIR, &sb) < OK && errno == ENOENT) { - perror(RH_CROND_DIR); - if (OK == mkdir(RH_CROND_DIR, 0700)) { - fprintf(stderr, "%s: created\n", RH_CROND_DIR); - stat(RH_CROND_DIR, &sb); - } else { - fprintf(stderr, "%s: ", RH_CROND_DIR); - perror("mkdir"); - exit(ERROR_EXIT); - } - } - if (!S_ISDIR(sb.st_mode)) { - fprintf(stderr, "'%s' is not a directory, bailing out.\n", - RH_CROND_DIR); - exit(ERROR_EXIT); - } - if (grp != NULL) { - if (sb.st_gid != grp->gr_gid) - if( chown(RH_CROND_DIR, -1, grp->gr_gid) == -1 ) - { - fprintf(stderr,"chdir %s failed: %s\n", RH_CROND_DIR, strerror(errno)); - exit(ERROR_EXIT); - } - if (sb.st_mode != 01730) - if( chmod(RH_CROND_DIR, 01730) == -1 ) - { - fprintf(stderr,"chmod 01730 %s failed: %s\n", RH_CROND_DIR, strerror(errno)); - exit(ERROR_EXIT); - } - } } /* acquire_daemonlock() - write our PID into /etc/cron.pid, unless