Only include grouplist functions when they are needed

This commit is contained in:
Nikos Mavrogiannopoulos
2015-07-01 20:59:54 +02:00
parent 2911ad5047
commit f895ff54fd
2 changed files with 15 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
#include <sec-mod-auth.h>
#include "auth-unix.h"
#ifdef HAVE_GET_USER_AUTH_GROUP
/* Fills-in groupname, if the user is in a unix group, via getpwnam().
* Returns -1 if the suggested group doesn't match one the groups, or
* zero otherwise (an empty group is still success).
@@ -104,3 +105,4 @@ void unix_group_list(void *pool, unsigned gid_min, char ***groupname, unsigned *
return;
}
#endif

View File

@@ -1,3 +1,16 @@
#ifndef HAVE_AUTH_UNIX_H
# define HAVE_AUTH_UNIX_H
# include <config.h>
#if defined(HAVE_GSSAPI) || defined(HAVE_PAM)
# define HAVE_GET_USER_AUTH_GROUP
#endif
#ifdef HAVE_GET_USER_AUTH_GROUP
int get_user_auth_group(const char *username, const char *suggested,
char *groupname, int groupname_size);
void unix_group_list(void *pool, unsigned gid_min, char ***groupname, unsigned *groupname_size);
#endif
#endif