struct utmpx.ut_xtime],,,[[#include <utmpx.h>]])
dnl Checks for library functions.
-AC_TYPE_GETGROUPS
AC_FUNC_UTIME_NULL
AC_REPLACE_FUNCS(putgrent putpwent putspent)
AC_REPLACE_FUNCS(sgetgrent sgetpwent sgetspent)
#include <grp.h>
#include <stdio.h>
#include <string.h>
+#include <sys/types.h>
#include "alloc/malloc.h"
#include "alloc/reallocf.h"
int
add_groups(const char *list)
{
- GETGROUPS_T *gids;
char *g, *p, *dup;
FILE *shadow_logfd = log_get_logfd();
+ gid_t *gids;
size_t n;
ssize_t n0;
if (n0 == -1)
return -1;
- gids = MALLOC(n0, GETGROUPS_T);
+ gids = MALLOC(n0, gid_t);
if (gids == NULL)
return -1;
if (n0 == -1)
goto free_gids;
- gids = REALLOCF(gids, n0 + strchrscnt(list, ",:") + 1, GETGROUPS_T);
+ gids = REALLOCF(gids, n0 + strchrscnt(list, ",:") + 1, gid_t);
if (gids == NULL)
return -1;
#include <grp.h>
#include <pwd.h>
#include <stdio.h>
-#include <assert.h>
+#include <sys/types.h>
#include "agetpass.h"
#include "alloc/x/xmalloc.h"
#include "string/strcmp/streq.h"
#include "string/strdup/xstrdup.h"
+#include <assert.h>
+
/*
* Global variables
extern char **newenvp;
static size_t ngroups;
-static /*@null@*/ /*@only@*/GETGROUPS_T *gids;
+static /*@null@*/ /*@only@*/gid_t *gids;
static bool is_newgrp;
if (ngroups == -1)
goto fail_gg;
- gids = XMALLOC(ngroups, GETGROUPS_T);
+ gids = XMALLOC(ngroups, gid_t);
ngroups = getgroups(ngroups, gids);
if (ngroups == -1) {
* If the group doesn't fit, I'll complain loudly and skip this
* part.
*/
- gids = XREALLOC(gids, ngroups + 1, GETGROUPS_T);
+ gids = XREALLOC(gids, ngroups + 1, gid_t);
LSEARCH(&gid, gids, &ngroups);