version 1.1, 2013/10/14 07:56:33
|
version 1.1.1.2, 2014/06/15 16:12:54
|
Line 30
|
Line 30
|
#include <grp.h> |
#include <grp.h> |
|
|
#define DEFAULT_TEXT_DOMAIN "sudo" |
#define DEFAULT_TEXT_DOMAIN "sudo" |
#include "gettext.h" | #include "gettext.h" /* must be included before missing.h */ |
|
|
#include "missing.h" |
#include "missing.h" |
#include "alloc.h" |
#include "alloc.h" |
#include "fatal.h" |
#include "fatal.h" |
#include "sudo_debug.h" |
#include "sudo_debug.h" |
|
#include "sudo_util.h" |
|
|
extern id_t atoid(const char *p, const char *sep, char **endp, const char **errstr); |
|
|
|
/* |
/* |
* Parse a comma-separated list of gids into an allocated array of GETGROUPS_T. |
* Parse a comma-separated list of gids into an allocated array of GETGROUPS_T. |
* If a pointer to the base gid is specified, it is stored as the first element |
* If a pointer to the base gid is specified, it is stored as the first element |
Line 77 parse_gid_list(const char *gidstr, const gid_t *basegi
|
Line 76 parse_gid_list(const char *gidstr, const gid_t *basegi
|
do { |
do { |
gids[ngids] = (GETGROUPS_T) atoid(cp, ",", &ep, &errstr); |
gids[ngids] = (GETGROUPS_T) atoid(cp, ",", &ep, &errstr); |
if (errstr != NULL) { |
if (errstr != NULL) { |
warningx(_("%s: %s"), cp, _(errstr)); | warningx(U_("%s: %s"), cp, U_(errstr)); |
free(gids); |
free(gids); |
debug_return_int(-1); |
debug_return_int(-1); |
} |
} |