From fca5020d3c379e40c927699bed4c29cc8708feec Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 26 Apr 2011 16:55:08 +0000 Subject: [PATCH] Split the --user delimiter skipping across two lines and add comments. --- jcc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jcc.c b/jcc.c index ac20b222..93d859d5 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.348 2011/04/26 16:50:11 fabiankeil Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.349 2011/04/26 16:53:21 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -2961,7 +2961,12 @@ int main(int argc, char **argv) group_name = strchr(user_arg, '.'); if (NULL != group_name) { - *group_name++ = '\0'; + /* Nul-terminate the user name */ + *group_name = '\0'; + + /* Skip the former delimiter to actually reach the group name */ + group_name++; + grp = getgrnam(group_name); if (NULL == grp) { -- 2.39.2