summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2009-06-02 05:09:17 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2009-06-02 05:09:17 +0000
commit480c2d0ae46a2fd613d41c3a9a99172f57a5213f (patch)
tree26b2594d5a36fd2e05451e5aa36f58fba6d4ef13 /lib
parent5e8f402de1f153e390662512275dd8c558387f5c (diff)
tweak previous;
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/Makefile.inc7
-rw-r--r--lib/libc/gen/getpwnam.310
2 files changed, 9 insertions, 8 deletions
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index e88bd1bd6ed..7ffea66e2db 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.47 2009/06/01 21:52:03 millert Exp $
+# $OpenBSD: Makefile.inc,v 1.48 2009/06/02 05:09:16 jmc Exp $
# gen sources
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_ARCH}/gen ${LIBCSRCDIR}/gen
@@ -108,8 +108,9 @@ MLINKS+=getgrent.3 endgrent.3 getgrent.3 setgroupent.3 getgrent.3 getgrgid.3 \
MLINKS+=gethostname.3 sethostname.3
MLINKS+=getnetgrent.3 endnetgrent.3 getnetgrent.3 innetgr.3 \
getnetgrent.3 setnetgrent.3
-MLINKS+=getpwent.3 endpwent.3 getpwent.3 setpassent.3 getpwent.3 setpwent.3
-MLINKS+=getpwnam.3 getpwuid.3 getpwnam.3 getpwnam_r.3 getpwnam.3 getpwuid_r.3
+MLINKS+=getpwent.3 endpwent.3 getpwent.3 setpwent.3
+MLINKS+=getpwnam.3 getpwuid.3 getpwnam.3 getpwnam_r.3 getpwnam.3 getpwuid_r.3 \
+ getpwnam.3 setpassent.3
MLINKS+=getttyent.3 endttyent.3 getttyent.3 getttynam.3 getttyent.3 setttyent.3
MLINKS+=getusershell.3 endusershell.3 getusershell.3 setusershell.3
MLINKS+=glob.3 globfree.3
diff --git a/lib/libc/gen/getpwnam.3 b/lib/libc/gen/getpwnam.3
index f963ae3288a..87842cc8b42 100644
--- a/lib/libc/gen/getpwnam.3
+++ b/lib/libc/gen/getpwnam.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getpwnam.3,v 1.1 2009/06/01 21:52:03 millert Exp $
+.\" $OpenBSD: getpwnam.3,v 1.2 2009/06/02 05:09:16 jmc Exp $
.\"
.\" Copyright (c) 1988, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 1 2009 $
+.Dd $Mdocdate: June 2 2009 $
.Dt GETPWNAM 3
.Os
.Sh NAME
@@ -93,7 +93,7 @@ is updated to reference those strings.
.Fn setpassent
accomplishes two purposes.
First, it causes
-.Fn getpwent
+.Xr getpwent 3
to
.Dq rewind
to the beginning of the database.
@@ -102,13 +102,13 @@ Additionally, if
is non-zero, file descriptors are left open, significantly speeding
up subsequent accesses for the lookup routines.
These file descriptors can be closed by a call to
-.Fn endpwent .
+.Xr endpwent 3 .
.Pp
It is dangerous for long-running programs to keep the file descriptors
open as the database will become out of date if it is updated while the
program is running.
Furthermore, programs that run child processes should be careful to call
-.Fn endpwent
+.Xr endpwent 3
to close these descriptors before calling
.Xr execve 2
or