summaryrefslogtreecommitdiff
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2015-10-27 04:41:19 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2015-10-27 04:41:19 +0000
commitc636faabab09109bfe9bdedfb268dec817efcdef (patch)
treeec71df561fe8555c0d071526af1db7c82f658346 /lib/libc/gen
parent252d051141b0ca5bcc2b073b9aa6c1adf36046fc (diff)
The fd of the passwd database is marked close-on-exec now
Incorrect text pointed out by tedu@ ok deraadt@ millert@ tedu@
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/getpwent.311
-rw-r--r--lib/libc/gen/getpwnam.311
2 files changed, 8 insertions, 14 deletions
diff --git a/lib/libc/gen/getpwent.3 b/lib/libc/gen/getpwent.3
index cc7167321f3..1189f238658 100644
--- a/lib/libc/gen/getpwent.3
+++ b/lib/libc/gen/getpwent.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getpwent.3,v 1.29 2015/01/15 03:19:43 millert Exp $
+.\" $OpenBSD: getpwent.3,v 1.30 2015/10/27 04:41:18 guenther 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: January 15 2015 $
+.Dd $Mdocdate: October 27 2015 $
.Dt GETPWENT 3
.Os
.Sh NAME
@@ -73,12 +73,9 @@ that wish to process the complete list of users.
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
-to close these descriptors before calling
+However the file descriptors are automatically closed when
.Xr execve 2
-or
-.Xr system 3 .
+is called.
.Pp
.Fn setpwent
causes
diff --git a/lib/libc/gen/getpwnam.3 b/lib/libc/gen/getpwnam.3
index f0e08480b13..9701d799242 100644
--- a/lib/libc/gen/getpwnam.3
+++ b/lib/libc/gen/getpwnam.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getpwnam.3,v 1.7 2015/01/15 03:19:43 millert Exp $
+.\" $OpenBSD: getpwnam.3,v 1.8 2015/10/27 04:41:18 guenther 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: January 15 2015 $
+.Dd $Mdocdate: October 27 2015 $
.Dt GETPWNAM 3
.Os
.Sh NAME
@@ -106,12 +106,9 @@ These file descriptors can be closed by a call to
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
-.Xr endpwent 3
-to close these descriptors before calling
+However the file descriptors are automatically closed when
.Xr execve 2
-or
-.Xr system 3 .
+is called.
.Pp
These routines have been written to
.Dq shadow