User ids cannot be negative (those are groups). So, error out if a
negative id is specified for createuser.
FIXES 128343
Change-Id: I6e81a419c797944bfed569aac529b9694702823d
Reviewed-on: http://gerrit.openafs.org/2993
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Phillip Moore <w.phillip.moore@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
printf("0 isn't a valid user id; aborting\n");
return EINVAL;
}
+ if (id < 0) {
+ code = PRBADARG;
+ afs_com_err(whoami, code, "because user id %d was not positive",
+ id);
+ return code;
+ }
idi = idi->next;
} else
id = 0;