DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

fields(S)


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.

locked_out 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 password lifetime has past. This routine is used prior to fashioning a session for an account, be it login, at, cron, or su sessions.

read_pw_fields 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.

store_pw_fields is the inverse of read_pw_fields. 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 read_tc_fields and store_tc_fields routines perform similar actions for the Terminal Control Database using the appropriate field and flag structures.

The read_pw_fields, and read_tc_fields 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 extension of AT&T System V provided by the Santa Cruz Operation.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003