From 72fbb4b1553b4e1c9bc61b0600d90c95a30977fd Mon Sep 17 00:00:00 2001
From: Fabian Keil <fk@fabiankeil.de>
Date: Tue, 26 Apr 2011 16:48:04 +0000
Subject: [PATCH] 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.
---
 jcc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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)))
-- 
2.49.0