mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
Only include grouplist functions when they are needed
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user