2 .\" Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LCKPWDF 3C "Dec 29, 1996"
8 lckpwdf, ulckpwdf \- manipulate shadow password database lock file
14 \fBint\fR \fBlckpwdf\fR(\fBvoid\fR);
19 \fBint\fR \fBulckpwdf\fR(\fBvoid\fR);
25 The \fBlckpwdf()\fR and \fBulckpwdf()\fR functions enable modification access
26 to the password databases through the lock file. A process first uses
27 \fBlckpwdf()\fR to lock the lock file, thereby gaining exclusive rights to
28 modify the \fB/etc/passwd\fR or \fB/etc/shadow\fR password database. See
29 \fBpasswd\fR(4) and \fBshadow\fR(4). Upon completing modifications, a process
30 should release the lock on the lock file using \fBulckpwdf()\fR. This mechanism
31 prevents simultaneous modification of the password databases. The lock file,
32 \fB/etc/.pwd.lock\fR, is used to coordinate modification access to the password
33 databases \fB/etc/passwd\fR and \fB/etc/shadow\fR.
37 If \fBlckpwdf()\fR is successful in locking the file within 15 seconds, it
38 returns \fB0\fR. If unsuccessful (for example, \fB/etc/.pwd.lock\fR is already
39 locked), it returns \fB\(mi1\fR\&.
42 If \fBulckpwdf()\fR is successful in unlocking the file \fB/etc/.pwd.lock\fR,
43 it returns \fB0\fR. If unsuccessful (for example, \fB/etc/.pwd.lock\fR is
44 already unlocked), it returns \fB\(mi1\fR\&.
48 These routines are for internal use only; compatibility is not guaranteed.
53 \fB\fB/etc/passwd\fR\fR
62 \fB\fB/etc/shadow\fR\fR
65 shadow password database
71 \fB\fB/etc/.pwd.lock\fR\fR
80 See \fBattributes\fR(5) for descriptions of the following attributes:
88 ATTRIBUTE TYPE ATTRIBUTE VALUE
96 \fBgetpwnam\fR(3C), \fBgetspnam\fR(3C), \fBpasswd\fR(4), \fBshadow\fR(4),