|
|
#include <iaf.h> #include <sys/types.h> #include <ia.h>int ia_openinfo(const char logname, uinfo_t uinfo);
void ia_closeinfo(uinfo_t uinfo);
void ia_get_uid(uinfo_t uinfo, uid_t uid);
void ia_get_gid(uinfo_t uinfo, gid_t gid);
int ia_get_sgid(uinfo_t uinfo, gid_t sgid, long cnt);
int ia_get_lvl(uinfo_t uinfo, level_t lvl, long cnt);
void ia_get_mask(uinfo_t uinfo, adtemask_t mask);
void ia_get_dir(uinfo_t uinfo, char dir);
void ia_get_sh(uinfo_t uinfo, char shell);
void ia_get_logpwd(uinfo_t uinfo, char passwd);
void ia_get_logchg(uinfo_t uinfo, long changed);
void ia_get_logmin(uinfo_t uinfo, long min);
void ia_get_logmax(uinfo_t uinfo, long max);
void ia_get_logwarn(uinfo_t uinfo, long warn);
void ia_get_loginact(uinfo_t uinfo, long inact);
void ia_get_logexpire(uinfo_t uinfo, long expire);
The access to the information (for the given logname) is provided after successfully calling ia_openinfo and remains open until either the process calls ia_closeinfo or the process exits. The results will be indeterminate if the functions are called with the identifier uinfo that was not previously obtained from ia_openinfo, or with the identifier that already has been closed with ia_closeinfo. Therefore, an application should determine when to call ia_closeinfo and if necessary copy the data represented by the identifier to its own address space before such a call takes place.
ia_openinfo opens the access to the identification and authentication information for logname and associates with it an identifier uinfo that is to be used with all other identification and authentication access functions.
ia_closeinfo closes the access to the identification and authentication information for the user identified by uinfo. ia_closeinfo is performed automatically for all identifiers upon calling exit(2).
ia_get_uid returns a pointer to the user ID, uid.
ia_get_gid returns a pointer to the group ID, gid.
ia_get_sgid returns a pointer to an array of supplementary group IDs, sgid_array, and a pointer to a count, cnt.
ia_get_lvl returns a pointer to an array of levels IDs, lvl, and a pointer to the count, cnt.
ia_get_mask returns a pointer to the user audit mask, mask.
ia_get_dir returns a pointer to the user home directory, dir.
ia_get_sh returns a pointer to the name of the user's shell, shell.
ia_get_logpwd returns a pointer to the user login password, passwd.
ia_get_logchg returns a pointer to the date when the login password was last changed, changed.
ia_get_logmin returns a pointer to the minimum days before the login password can change, min.
ia_get_logmax returns a pointer to the number of days that the login password is valid, max.
ia_get_logwarn returns a pointer to the number of days before the login password expires, warn.
ia_get_loginact returns a pointer to the number of days the login may be inactive, inact.
ia_get_logexpire returns a pointer to the date when the login expires, expire.
All other functions, upon successful completion, will return as an argument either a pointer to the appropriate identification and authentication information, or a NULL pointer on a failure.
Additionally, ia_get_sgid, ia_get_lvl and ia_get_mask return a value of 0 on success and non-zero on failure.