|
@@ -183,7 +183,12 @@ __authunix_create_default (void)
|
|
|
uid_t uid;
|
|
|
gid_t gid;
|
|
|
int max_nr_groups = sysconf (_SC_NGROUPS_MAX);
|
|
|
- gid_t gids[max_nr_groups];
|
|
|
+ gid_t *gids;
|
|
|
+ AUTH *ret_auth;
|
|
|
+
|
|
|
+ gids = (gid_t*)malloc(sizeof(*gids) * max_nr_groups);
|
|
|
+ if (gids == NULL)
|
|
|
+ abort ();
|
|
|
|
|
|
if (gethostname (machname, MAX_MACHINE_NAME) == -1)
|
|
|
abort ();
|
|
@@ -196,7 +201,9 @@ __authunix_create_default (void)
|
|
|
/* This braindamaged Sun code forces us here to truncate the
|
|
|
list of groups to NGRPS members since the code in
|
|
|
authuxprot.c transforms a fixed array. Grrr. */
|
|
|
- return __authunix_create (machname, uid, gid, MIN (NGRPS, len), gids);
|
|
|
+ ret_auth = __authunix_create (machname, uid, gid, MIN (NGRPS, len), gids);
|
|
|
+ free (gids);
|
|
|
+ return ret_auth;
|
|
|
}
|
|
|
strong_alias(__authunix_create_default,authunix_create_default)
|
|
|
|