HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
l
lckpwdf(3C) lckpwdf(3C)
NAME
lckpwdf(), ulckpwdf() - control access to /etc/passwd file
SYNOPSIS
#include <shadow.h>
int lckpwdf (void)
int ulckpwdf (void)
DESCRIPTION
The lckpwdf() and ulckpwdf() routines are used to coordinate modification access to the password
file /etc/passwd and to the secure password entries. The lock file used by these two routines is
/etc/.pwd.lock. A process first calls lckpwdf() to gain exclusive access rights for password
modification. When modifications are complete, ulckpwdf() is called to release the lock on
/etc/.pwd.lock. This mechanism prevents simultaneous modification of password files or entries.
APPLICATION USAGE
lckpwdf() and ulckpwdf() are thread-safe. These interfaces are not cancel-safe. A cancellation
point may occur when a thread is executing these interfaces.
RETURN VALUE
The lckpwdf() routine returns zero upon successful completion. If the lock could not be obtained, it
returns −1 and sets errno to indicate the error.
The ulckpwdf() routine returns zero upon successful completion. If the lock has already been released,
ulckpwdf() returns −1 and sets errno to indicate the error.
FILES
/etc/passwd
/etc/.pwd.lock
SEE ALSO
getpwent(3C), passwd(4).
HP-UX Release 11i: December 2000 − 1 − Section 3−−481
___
___