HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)
g
getspent(3C) getspent(3C)
The routines getspent() , getspnam() and getspnam_r()
depend on the configuration of the
/etc/nsswitch.conf
file. See nsswitch.conf(4). Entries may reside in any repository specified in
/etc/nsswitch.conf
. These routines use the switch for the
passwd database; for example, an entry
in
/etc/nsswitch.conf
would contain "passwd: nis files"
.
Programs using these routines must be compiled with
-lsec.
APPLICATION USAGE
In a multithreaded application on standard systems,
getspnam, getspnam_r() , getspent() ,
setspent() , endspent() and fgetspent() are thread-safe, but not async-cancel-safe. A cancella-
tion point may occur when a thread is executing any of these interfaces. On systems which have been con-
verted to trusted mode, only fgetspent() is thread-safe.
RETURN VALUE
If an EOF or error is encountered while reading,
getspnam() , getspnam_r() , getspent() , and
fgetspent() return a NULL pointer. Otherwise, the return value points to a valid
spwd structure. In
the case of
getspnam() , getspent(), and
fgetspent() , the spwd structure resides in an internal
area. In the case of
getspnam_r() , the
spwd structure resides in the spwd structure pointed to by the
result argument.
WARNINGS
HP-UX 11i Version 3 is the last release to support trusted systems functionality.
FILES
/etc/passwd system password file.
/etc/shadow shadow password file.
/tcb/files/auth/*/*
protected password database, for trusted systems.
SEE ALSO
getpwent(3C), getprpwent(3), nsswitch.conf(4), passwd(4), shadow(4).
STANDARDS CONFORMANCE
getspent : SVID3
568 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: February 2007