parse_gid_list() now returns -1 on error instead of calling fatalx().

This commit is contained in:
Todd C. Miller
2014-04-07 05:33:36 -06:00
parent 36b991348c
commit ac3ffde5e8
2 changed files with 4 additions and 2 deletions

View File

@@ -626,9 +626,11 @@ command_info_to_details(char * const info[], struct command_details *details)
break;
}
if (strncmp("runas_groups=", info[i], sizeof("runas_groups=") - 1) == 0) {
/* parse_gid_list() will call fatalx() on error. */
cp = info[i] + sizeof("runas_groups=") - 1;
details->ngroups = parse_gid_list(cp, NULL, &details->groups);
/* parse_gid_list() will print a warning on error. */
if (details->ngroups == -1)
exit(1);
break;
}
if (strncmp("runas_uid=", info[i], sizeof("runas_uid=") - 1) == 0) {