fields(S) 6 January 1993 fields(S) Name fields - return status based on fields of authentication database Syntax cc . . . -lprot -lx #include <sys/types.h> #include <sys/security.h> #include <sys/audit.h> #include <prot.h> int locked_out(pr) struct pr_passwd *pr; int read_pw_fields(fld, flg) struct pr_field *fld; struct pr_flag *flg; int store_pw_fields(f, name, fd, fg) FILE *f; char *name; struct pr_field *fd; struct pr_flag *fg; void read_tc_fields(fld, flg) struct t_field *fld; struct t_flag *flg; int store_tc_fields(f, name, fd, fg) FILE *f; char *name; struct t_field *fd; struct t_flag *fg; Description These routines return various information based on the user, process environment, and the values within the authentication database. lockedout returns 1 if the user represented in the pr_passwd structure referenced by pr cannot log in for some reason and returns 0 if the user is able to log in. The reasons include: unconditional lock-out from the system administrator, too many unsuccessful login tries, and/or the pass- word lifetime has past. This routine is used prior to fashioning a ses- sion for an account, be it login, at, cron, or su sessions. readpwfields fills in the pr_field and pr_flag parts of a pr_passwd structure with the contents from the current protected password entry. This entry must previously be obtained with a getprpwent(S) or getprpwnam(S) call. storepwfields is the inverse of readpwfields. It creates a file entry based on one of the pr_passwd structure components pr_field and pr_flag, and writes them to the protected password database under the key name to file f. The readtcfields and storetcfields routines perform similar actions for the Terminal Control Database using the appropriate field and flag structures. The readpwfields, and readtcfields routines may be applied to either an entry in their respective databases or to a defaults entry. The pr_passwd, and pr_term, structures contain extra elements to hold default values. See also authcap(F), authcap(S), getprpwent(S), getprtcent(S) Standards conformance fields is not part of any currently supported standard; it is an exten- sion of AT&T System V provided by the Santa Cruz Operation.