Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getpw(3C) — HP-UX 10.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpwent(3C)

passwd(4)

getpw(3C)

NAME

getpw() − get name from UID

SYNOPSIS

#include <pwd.h>

int getpw(uid_t uid, char *buf);

DESCRIPTION

getpw() searches the password file for a user ID number that equals uid, copies the line of the password file in which uid was found into the array pointed to by buf, and returns 0. getpw() returns non-zero if uid cannot be found.  The line is null-terminated. 

This routine is included only for compatibility with prior systems, and should not be used; see getpwent(3C) for routines to use instead.

NETWORKING FEATURES

NFS

This routine is implemented using getpwuid() (see getpwuid(3C)) and therefore uses the Network Information Service network database as described in passwd(4).

RETURN VALUE

getpw() returns non-zero on error. 

WARNINGS

The above routine uses <stdio.h>, which causes it to increase, more than might be expected, the size of programs not otherwise using standard I/O. 

AUTHOR

getpw() was developed by AT&T and HP. 

FILES

/etc/passwd

SEE ALSO

getpwent(3C), passwd(4). 

STANDARDS CONFORMANCE

getpw(): XPG2

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026