PWCACHE

Section: C Library Functions (3)
Index Return to Main Contents

BSD mandoc
 

NAME

pwcache - cache password and group entries  

SYNOPSIS

Fn user_from_uid uid_t uid int nouser Fn group_from_gid gid_t gid int nogroup  

DESCRIPTION

Bf -symbolic This interface is not part of the C library. It has been placed in the Berkeley utility library, libutil, as it is used by several standard utilities. Ef

The Fn user_from_uid function returns the user name associated with the argument Fa uid . The user name is cached so that multiple calls with the same Fa uid do not require additional calls to getpwuid(3). If there is no user associated with the Fa uid , a pointer is returned to an ASCII representation of the Fa uid , unless the argument Fa nouser is non-zero, in which case a NULL pointer is returned.

The Fn group_from_gid function returns the group name associated with the argument Fa gid . The group name is cached so that multiple calls with the same Fa gid do not require additional calls to getgrgid(3). If there is no group associated with the Fa gid , a pointer is returned to an ASCII representation of the Fa gid , unless the argument Fa nogroup is non-zero, in which case a NULL pointer is returned.  

SEE ALSO

getgrgid(3), getpwuid(3)  

HISTORY

The Fn user_from_id and Fn group_from_id functions are Ud .


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
HISTORY

This document was created by man2html, using the manual pages.
Time: 06:45:01 GMT, May 19, 2025