- argc--;
- argv++;
- }
-
- if ( whichApp == CHMOD_APP ) {
- /* Find the specified modes */
- if ( parse_mode(*argv, &orWithMode, &andWithMode, 0) == FALSE ) {
- fprintf(stderr, "%s: Unknown mode: %s\n", invocationName, *argv);
- exit( FALSE);
- }
- mode &= andWithMode;
- mode |= orWithMode;
- } else {
-
- /* Find the selected group */
- groupName = strchr(*argv, '.');
- if ( whichApp==TRUE && groupName )
- *groupName++ = '\0';
- else
- groupName = *argv;
- grp = getgrnam(groupName);
- if (grp == NULL) {
- fprintf(stderr, "%s: Unknown group name: %s\n", invocationName, groupName);
- exit( FALSE);
+
+ argv += optind;
+
+ /* First, check if there is a group name here */
+ if ((groupName = strchr(*argv, '.')) == NULL) {
+ groupName = strchr(*argv, ':');