|
NAMEAG_User —
agar user account information interface
SYNOPSIS#include <agar/core.h> DESCRIPTIONAG_User provides a cross-platform method for accessing
information about user accounts. Different backends may be implemented (see
INTERNAL API below). Agar provides the
following backends:
INTERFACEAG_UserNew *AG_UserNew (void);
The typedef struct ag_user { char name[AG_USER_NAME_MAX]; /* User name */ Uint flags; #define AG_USER_NO_ACCOUNT 0x01 /* Not a real user account */ char *passwd; /* Encrypted password */ Uint32 uid; /* User ID */ Uint32 gid; /* Group ID */ char *loginClass; /* Login class */ char *gecos; /* Honeywell login info */ char *home; /* Home directory */ char *shell; /* Default shell */ char *tmp; /* Temp. directory */ AG_TAILQ_ENTRY(ag_user) users; } AG_User; The The The The BACKEND INTERFACEThe argument toAG_SetUserOps () should point to the
following structure:
typedef struct ag_user_ops { const char *name; /* Name for this backend */ void (*init)(void); void (*destroy)(void); int (*getUserByName)(AG_User *, const char *); int (*getUserByUID)(AG_User *, Uint32); int (*getRealUser)(AG_User *); int (*getEffectiveUser)(AG_User *); } AG_UserOps;
On success, the query methods
SEE ALSOAG_File(3), AG_Intro(3)HISTORYTheAG_User interface first appeared in Agar 1.5.0
Visit the GSP FreeBSD Man Page Interface. |