]> granicus.if.org Git - sudo/commitdiff
parse_gid_list() now returns -1 on error instead of calling fatalx().
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Apr 2014 11:33:36 +0000 (05:33 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 7 Apr 2014 11:33:36 +0000 (05:33 -0600)
common/gidlist.c
src/sudo.c

index 4029fa715c00c707c14b8cc1585264f8b1d93bfc..9d5d4805f9500eccb70b49a4b8bf4e87d8a00279 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2013-2014 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
index a0bb63392fd913fbd89d468d91446d28a1eadfd7..971cf27197b6d4e5d49f9eba9883034eb91629ea 100644 (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) {