Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

getpwnam_r(3) Guardian Native C Library Calls Reference Manual
Compile your application using the #dene _SPT_MODEL_ macro or an equivalent
compiler command option
For more information about threaded and 64-bit applications in the OSS environment, see the
Open System Services Programmer’s Guide.
RETURN VALUES
Upon successful completion, the getpwnam( ) function returns a 0 (zero). Otherwise, a nonzero
error number is returned and errno is set to indicate the error.
ERRORS
If any of these conditions occur, the getpwnam_r() function sets errno to the corresponding
value:
[EAGAIN] A system resource is temporarily unavailable. The function cannot allocate
sufficient heap space to complete the call.
[EINVAL] The value specified for the name parameter is outside the range of valid values
for usernames or cannot be passed in the call for other reasons.
[EIO] A disk process or file system input or output error occurred. Data might have
been lost during the transfer.
[ENAMETOOLONG]
The value specified for the name parameter exceeds the maximum number of
characters allowed for a username.
[ENOCRE] The calling process does not use the Common Run-Time Environment (CRE)
but requested a service that requires CRE (the static area cannot be allocated in
the calling process).
[ENOENT] The specified username does not exist, or the name parameter contains an empty
string.
[ENOMEM] There is insufficient user memory to complete the call.
[ERANGE] Insufficient storage was supplied via buffer and buflen to contain the data to be
referenced by the resulting passwd structure.
RELATED INFORMATION
Functions: endpwent(3), getpwent(3), getpwent_r(3), getpwent(3), getpwnam(3),
getpwuid(3), getpwuid_r(3), setpwent(3).
STANDARDS CONFORMANCE
H06.21 and later H-series RVUs, J06.10 and later J-series RVUs
This function conforms to IEEE Std 1003.1 2004, POSIX System Application Program Interface.
The following are HP extensions to the standard:
The errno values [EAGAIN], [EINVAL], [ENAMETOOLONG], [ENOCRE],
[ENOENT], and [ENOMEM] can be returned.
Standard POSIX Threads Library
This function is an extension to the UNIX98 specification. Interfaces documented on this refer-
ence page conform to the following industry standards:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header file spthread.h is an HP exception to the POSIX standard.
358 Hewlett-Packard Company 527192-018