HP-UX Reference (11i v2 07/12) - 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 systems not converted to trusted mode,
getspnam,
getspnam_r() ,
getspent() , setspent() , endspent() and fgetspent()
are thread-safe, but not async-cancel-
safe. A cancellation point may occur when a thread is executing any of these interfaces. On systems which
have been converted 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.
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
HP-UX 11i Version 2: December 2007 Update 2 Hewlett-Packard Company 543