diff options
Diffstat (limited to 'lib/libc/gen/getpwnam.3')
-rw-r--r-- | lib/libc/gen/getpwnam.3 | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/lib/libc/gen/getpwnam.3 b/lib/libc/gen/getpwnam.3 index 8d22c69058c..1936d38026d 100644 --- a/lib/libc/gen/getpwnam.3 +++ b/lib/libc/gen/getpwnam.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: getpwnam.3,v 1.12 2017/10/17 22:47:58 schwarze Exp $ +.\" $OpenBSD: getpwnam.3,v 1.13 2018/08/21 20:20:04 millert 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: October 17 2017 $ +.Dd $Mdocdate: August 21 2018 $ .Dt GETPWNAM 3 .Os .Sh NAME @@ -165,12 +165,22 @@ and respects the order of both normal and YP entries in the passwd file. .Sh RETURN VALUES The functions -.Fn getpwnam +.Fn getpwnam , +.Fn getpwnam_shadow , +.Fn getpwuid , and -.Fn getpwuid -return a pointer to a passwd structure if a match is found or a -.Dv NULL +.Fn getpwuid_shadow +return a pointer to a passwd structure if a match is found or a null pointer if no match is found or an error occurs. +Subsequent calls to +.Fn getpwent , +.Fn getpwnam , +.Fn getpwnam_shadow , +.Fn getpwuid +or +.Fn getpwuid_shadow +may invalidate the returned pointer or overwrite the contents +of the passwd structure it points to. .Pp The functions .Fn getpwnam_r @@ -279,16 +289,3 @@ and .Fn getpwuid_shadow in .Ox 5.9 . -.Sh BUGS -The -.Fn getpwnam -and -.Fn getpwuid -functions store their results in an internal static buffer and return -a pointer to that buffer. -Subsequent calls to -.Fn getpwent , -.Fn getpwnam , -or -.Fn getpwuid -will overwrite the same buffer. |