Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference (Volume 6 of 9): Section 3: Library Functions (A-M) > g

getpw(3C)

TO BE OBSOLETED
» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

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.

APPLICATION USAGE

getpw() is thread-safe. It is not async-cancel-safe. A cancellation point may occur when a thread is executing getpw().

NETWORKING FEATURES

NFS

This routine is implemented using getpwuid() (see getpwent(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.

Obsolescent Interfaces

getpw() is to be obsoleted at a future date.

AUTHOR

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

FILES

/etc/passwd

STANDARDS CONFORMANCE

getpw(): XPG2

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2000 Hewlett-Packard Development Company, L.P.