Add getgrouplist() support to os_calls
On enterprise systems, using getgrouplist() (if available) is more efficient than iterating over the members of the group, and is also more likely to work
This commit is contained in:
@@ -323,6 +323,15 @@ int g_getuser_info_by_name(const char *username, int *uid, int *gid,
|
||||
int g_getuser_info_by_uid(int uid, char **username, int *gid,
|
||||
char **shell, char **dir, char **gecos);
|
||||
int g_getgroup_info(const char *groupname, int *gid);
|
||||
/**
|
||||
* Checks whether a user is in the specified group
|
||||
* @param username Name of user
|
||||
* @param gid GID of group
|
||||
* @param[out] ok Whether user is in group
|
||||
* @return Non-zero if a system error occurred. In this instance OK is not set
|
||||
*
|
||||
* Primary group of username is also checked
|
||||
*/
|
||||
int g_check_user_in_group(const char *username, int gid, int *ok);
|
||||
int g_time1(void);
|
||||
int g_time2(void);
|
||||
|
||||
Reference in New Issue
Block a user