From: Fabian Keil Date: Tue, 26 Apr 2011 16:48:04 +0000 (+0000) Subject: If the --user argument user[.group] contains a dot, always bail out if no group has... X-Git-Tag: v_3_0_18~253 X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/@default-cgi@toggle?a=commitdiff_plain;h=72fbb4b1553b4e1c9bc61b0600d90c95a30977fd;p=privoxy.git If the --user argument user[.group] contains a dot, always bail out if no group has been specified. Previously the intended, but undocumented, behaviour was to try interpreting the whole argument as user name, but the detection was flawed and checked for '0' isntead of '\0', thus merely preventing group names beginning with a zero. Remove the incorrect check instead of fixing it to get the documented behaviour. --- diff --git a/jcc.c b/jcc.c index ab29cfa1..9dfe3649 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.344 2011/03/27 13:58:09 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.345 2011/04/19 13:00:47 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2950,7 +2950,7 @@ int main(int argc, char **argv) { if (++argc_pos == argc) usage(argv[argc_pos]); - if ((NULL != (p = strchr(argv[argc_pos], '.'))) && *(p + 1) != '0') + if (NULL != (p = strchr(argv[argc_pos], '.'))) { *p++ = '\0'; if (NULL == (grp = getgrnam(p)))