From: Matthew Newton Date: Sun, 8 Apr 2012 21:02:55 +0000 (+0100) Subject: don't chgrp syslog X-Git-Tag: release_2_2_0~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c97515a8cf9bd09660047e3cedf90d12cf915393;p=thirdparty%2Ffreeradius-server.git don't chgrp syslog --- diff --git a/src/modules/rlm_linelog/rlm_linelog.c b/src/modules/rlm_linelog/rlm_linelog.c index e86175d6d83..2c322c1dbca 100644 --- a/src/modules/rlm_linelog/rlm_linelog.c +++ b/src/modules/rlm_linelog/rlm_linelog.c @@ -300,27 +300,27 @@ static int do_linelog(void *instance, REQUEST *request) buffer, strerror(errno)); return RLM_MODULE_FAIL; } - } #ifdef HAVE_GRP_H - if (inst->group != NULL) { - gid = strtol(inst->group, &endptr, 10); - if (*endptr != '\0') { - grp = getgrnam(inst->group); - if (grp == NULL) { - RDEBUG2("Unable to find system group \"%s\"", inst->group); - goto skip_group; + if (inst->group != NULL) { + gid = strtol(inst->group, &endptr, 10); + if (*endptr != '\0') { + grp = getgrnam(inst->group); + if (grp == NULL) { + RDEBUG2("Unable to find system group \"%s\"", inst->group); + goto skip_group; + } + gid = grp->gr_gid; } - gid = grp->gr_gid; - } - if (chown(buffer, -1, gid) == -1) { - RDEBUG2("Unable to change system group of \"%s\"", buffer); + if (chown(buffer, -1, gid) == -1) { + RDEBUG2("Unable to change system group of \"%s\"", buffer); + } } +#endif } skip_group: -#endif /* * FIXME: Check length.