HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)
g
getprpwent(3) getprpwent(3)
(TO BE OBSOLETED)
A call to setprpwent has the effect of rewinding the protected password database to allow repeated
searches. endprpwent can be called to close the protected password database when processing is com-
plete.
putprpwnam puts a new or replaces a protected password entry pr with key name into the database. If
the uflg.fg_name field is 0, the requested entry is deleted from the protected password database.
putprpwnam locks the database for all update operations, and performs a
endprpwent after the update
or failed attempt.
Notes
The value returned by
getprpwent and getprpwnam
refers to a structure that is overwritten by calls
to these routines. To retrieve an entry, modify it, and replace it in the database, copy the entry using
structure assignment and supply the modified buffer to
putprpwnam .
On systems supporting network connections, the fd_suctty and fd_unsuctty fields can be the ASCII
representation of the network address of the host from which the last successful or unsuccessful remote
login to the account occurred. Use
getdvagnam (see getdvagent(3)) to investigate the type of device to
determine whether a host or a terminal was used for the last successful or unsuccessful login.
Programs using these routines must be compiled with
-lsec
.
If you link your application with the archive version of
libsec (libsec.a), these routines work
independent of the Name Service Switch. The protected password database exists only in the /tcb direc-
tory on the local system.
getprpwent assumes one name per UID and one UID per name. The sequential scan loops between the
first two instances of a multiple UID.
getprpwent uses getpwent(3C) routines to sequentially scan databases. User program references to
password entries obtained using getpwent(3C) routines will not be valid after using any routines described
here (that is, the * prp*routines).
All of these routines depend on the configuration of the Name Service Switch file,
/etc/nsswitch.conf
. These routines use the switch for the passwd database.
APPLICATION USAGE
In a multithreaded application, these routines are safe to be called only from one dedicated thread. These
routines are not POSIX.1c async-cancel safe nor async-signal safe. The Name Service Switch database used
for the protected database API is
passwd. For example, an entry in /etc/nsswitch.conf
would
contain
passwd: files.
RETURN VALUE
getprpwent , getprpwuid , getprpwaid , and getprpwnam return NULL pointers on EOF or
error. putprpwnam returns 0 if it cannot add or update the entry.
WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality.
FILES
/etc/passwd System Password file
/tcb/files/auth/*/* Protected Password database
/tcb/files/auth/system/default System Defaults database
SEE ALSO
authcap(4), getpwent(3C), getprdfent(3), prpwd(4).
HP-UX 11i Version 3: February 2007 − 4 − Hewlett-Packard Company 551