From: Tomas Mraz Date: Fri, 11 Mar 2011 15:55:33 +0000 (+0100) Subject: Do not try to compile dead code. X-Git-Tag: cronie1.4.7~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47a1a7910507eb2120011f707537ccca36a3b39b;p=cronie Do not try to compile dead code. --- diff --git a/src/misc.c b/src/misc.c index f640f29..a617709 100644 --- a/src/misc.c +++ b/src/misc.c @@ -224,9 +224,9 @@ void set_cron_uid(void) { void check_spool_dir(void) { struct stat sb; +#ifdef CRON_GROUP struct group *grp = NULL; -#ifdef CRON_GROUP grp = getgrnam(CRON_GROUP); #endif /* check SPOOL_DIR existence @@ -250,6 +250,7 @@ void check_spool_dir(void) { fprintf(stderr, "'%s' is not a directory, bailing out.\n", SPOOL_DIR); exit(ERROR_EXIT); } +#ifdef CRON_GROUP if (grp != NULL) { if (sb.st_gid != grp->gr_gid) if (chown(SPOOL_DIR, -1, grp->gr_gid) == -1) { @@ -264,6 +265,7 @@ void check_spool_dir(void) { exit(ERROR_EXIT); } } +#endif } /* acquire_daemonlock() - write our PID into /etc/cron.pid, unless