userspec: support optional parameters to parse_user_spec()
* lib/userspec.c (parse_user_spec): If the GID param is NULL, then avoid group processing and treat the full spec as a user. (parse_with_separator): Allow the USERNAME and GROUPNAME to be optional params (NULL), in which case they're ignored. * tests/test-userspec.c (main): Ensure NULL params are ignored.
Showing with 41 additions and 10 deletions