summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorjmc <jmc@openbsd.org>2009-06-02 05:09:16 +0000
committerjmc <jmc@openbsd.org>2009-06-02 05:09:16 +0000
commit6a3932990432257ec3fd87149827daf776f18254 (patch)
treed0577583943fc98f46a8df80cd765da3cd555f9a /lib/libc
parentEnable machfb(4) and raptor(4) here too. (diff)
downloadwireguard-openbsd-6a3932990432257ec3fd87149827daf776f18254.tar.xz
wireguard-openbsd-6a3932990432257ec3fd87149827daf776f18254.zip
tweak previous;
Diffstat (limited to 'lib/libc')
-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