AC_CHECK_FUNCS(arc4random_buf futimes \
getentropy getrandom getspnam getusershell \
initgroups lckpwdf lutimes \
- setgroups updwtmpx innetgr \
+ updwtmpx innetgr \
getspnam_r \
rpmatch \
memset_explicit explicit_bzero stpecpy stpeprintf)
#include <config.h>
-#if defined (HAVE_SETGROUPS) && ! defined (USE_PAM)
+#if !defined(USE_PAM)
#include "prototypes.h"
#include "defines.h"
free (grouplist);
return 0;
}
-#else /* HAVE_SETGROUPS && !USE_PAM */
+#else /* !USE_PAM */
extern int ISO_C_forbids_an_empty_translation_unit;
-#endif /* HAVE_SETGROUPS && !USE_PAM */
-
+#endif /* !USE_PAM */
extern char **newenvp;
-#ifdef HAVE_SETGROUPS
static int ngroups;
static /*@null@*/ /*@only@*/GETGROUPS_T *grouplist;
-#endif
static bool is_newgrp;
}
}
-#ifdef HAVE_SETGROUPS
/*
* get the current user's groupset. The new group will be added to
* the concurrent groupset if there is room, otherwise you get a
#endif
exit (EXIT_FAILURE);
}
-#endif /* HAVE_SETGROUPS */
/*
* now we put her in the new group. The password file entry for her
goto failure;
}
-#ifdef HAVE_SETGROUPS
/* when using pam_group, she will not be listed in the groups
* database. However getgroups() will return the group. So
* if she is listed there already it is ok to grant membership.
break;
}
}
-#endif /* HAVE_SETGROUPS */
+
/*
* For split groups (due to limitations of NIS), check all
* groups of the same GID like the requested group for
gid = grp->gr_gid;
-#ifdef HAVE_SETGROUPS
/*
* I am going to try to add her new group id to her concurrent group
* set. If the group id is already present I'll just skip this part.
}
}
}
-#endif
/*
* Close all files before changing the user/group IDs.