Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getpw(3C) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpwnam(3C)

passwd(4)

attributes(5)

getpw(3C)

NAME

getpw − get passwd entry from UID

SYNOPSIS

#include <stdlib.h>

int getpw(uid_t uid, char ∗buf);

DESCRIPTION

getpw() searches the user data base 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. 

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

RETURN VALUES

getpw() returns non-zero on error. 

FILES

/etc/passwd

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level Safe

SEE ALSO

getpwnam(3C), passwd(4), attributes(5)

NOTES

If the /etc/passwd and the /etc/group files have the “+” for the NIS entry, then getpwent() and getgwent() will not return NULL when the end of file is reached. 

SunOS 5.6  —  Last change: 29 Dec 1996

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