Add function to get user information by UID
Moving to a uid_t to store the user information makes a lot of sense. When doing this, we need a function to get information about a user from the uid_t As well as creating the function g_getuser_info_by_uid() we also rename g_getuser_info() to g_getuser_info_by_name() and make the parameter ordering more usual.
This commit is contained in:
+4
-2
@@ -193,8 +193,10 @@ int g_exit(int exit_code);
|
||||
int g_getpid(void);
|
||||
int g_sigterm(int pid);
|
||||
int g_sighup(int pid);
|
||||
int g_getuser_info(const char *username, int *gid, int *uid, char **shell,
|
||||
char **dir, char **gecos);
|
||||
int g_getuser_info_by_name(const char *username, int *uid, int *gid,
|
||||
char **shell, char **dir, char **gecos);
|
||||
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);
|
||||
int g_check_user_in_group(const char *username, int gid, int *ok);
|
||||
int g_time1(void);
|
||||
|
||||
Reference in New Issue
Block a user