For consistency with the code checking user ids in createuser, check
for a specified group id of 0 specifically and give a slightly
different error message for it.
Change-Id: I362302a1a59fbe324f7f3e926f02177c24a5577d
Reviewed-on: http://gerrit.openafs.org/2994
Reviewed-by: Phillip Moore <w.phillip.moore@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
idi->data);
return code;
}
- if (id >= 0) {
+ if (id == 0) {
+ printf("0 isn't a valid group id; aborting\n");
+ return EINVAL;
+ }
+ if (id > 0) {
code = PRBADARG;
afs_com_err(whoami, code, "because group id %d was not negative",
id);
return code;
}
- if (id == 0) {
- printf("0 isn't a valid user id; aborting\n");
- return EINVAL;
- }
-
idi = idi->next;
} else
id = 0;