getprtcent.3 (2010 09)

g
getprtcent(3) getprtcent(3)
(TO BE OBSOLETED)
NAME
getprtcent, getprtcnam, setprtcent, endprtcent, putprtcnam - manipulate terminal control database entry
for a trusted system
SYNOPSIS
#include <sys/types.h>
#include <hpsecurity.h>
#include <prot.h>
struct pr_term *getprtcent(void);
struct pr_term *getprtcnam(const char *name);
void setprtcent(void);
void endprtcent(void);
int putprtcnam(const char *name, struct pr_term *pr);
DESCRIPTION
getprtcent and getprtcnam each returns a pointer to an object with the following structure contain-
ing the broken-out fields of an entry in the terminal control database. Each entry in the database con-
tains a pr_term structure, declared in the <prot.h> header file:
struct t_field {
char fd_devname[14]; /* Terminal (or host) name */
uid_t fd_uid; /* uid of last successful login */
time_t fd_slogin; /* time stamp of successful login */
uid_t fd_uuid; /* uid of last unsuccessful login */
time_t fd_ulogin; /* time stamp of unsuccessful login */
int fd_nlogins; /* consecutive failed attempts */
int fd_max_tries; /* maximum unsuc login tries allowed */
time_t fd_logdelay; /* delay between login tries */
char fd_lock; /* terminal locked? */
int fd_login_timeout; /* login timeout in seconds */
};
struct t_flag {
unsigned short
fg_devname:1, /* Is fd_devname set? */
fg_uid:1, /* Is fd_uid set? */
fg_slogin:1, /* Is fd_stime set? */
fg_uuid:1, /* Is fd_uuid set? */
fg_ulogin:1, /* Is fd_ftime set? */
fg_nlogins:1, /* Is fd_nlogins set? */
fg_max_tries:1, /* Is fd_max_tries set? */
fg_logdelay:1, /* Is fd_logdelay set? */
fg_lock:1, /* Is fd_lock set? */
fg_login_timeout:1 /* is fd_login_timeout valid? */
;
};
struct pr_term {
struct t_field ufld;
struct t_flag uflg;
struct t_field sfld;
struct t_flag sflg;
};
The system stores the user ID and time of the last successful login ( fd_uid and fd_slogin ) and unsuccess-
ful login ( fd_uuid and fd_ulogin ) in the appropriate Terminal Control database entry. The system incre-
ments fd_nlogins with each unsuccessful login, and resets the field to 0 on a successful login. The
fd_max_tries field is a limit on the number of unsuccessful logins until the account is locked. An adminis-
trative lock can also be applied, indicated by a non-zero fd_lock field. fd_logdelay stores the amount of
time (in seconds) that the system waits between unsuccessful login attempts, and fd_login_timeout stores
the number of seconds from the beginning of an authentication attempt until the login attempt is ter-
minated.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)