X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/a9647b53cc82fed22e6bbee47b15db9b2a7d88f6..ae59e04cb5f746d72d5e3e8c84dad7862c9b50e7:/usr/src/lib/libcompat/4.1/getpw.3 diff --git a/usr/src/lib/libcompat/4.1/getpw.3 b/usr/src/lib/libcompat/4.1/getpw.3 index 5c2402d5e9..b85f25b160 100644 --- a/usr/src/lib/libcompat/4.1/getpw.3 +++ b/usr/src/lib/libcompat/4.1/getpw.3 @@ -1,36 +1,52 @@ -.\" @(#)getpw.3 6.3 (Berkeley) %G% +.\" Copyright (c) 1990 The Regents of the University of California. +.\" All rights reserved. .\" -.TH GETPW 3 "" -.AT 3 -.SH NAME -getpw \- get name from uid -.SH SYNOPSIS -.nf -.B getpw(uid, buf) -.B char *buf; -.fi -.SH DESCRIPTION -.ft B -Getpw is made obsolete by getpwuid(3). +.\" %sccs.include.redist.man% +.\" +.\" @(#)getpw.3 6.4 (Berkeley) %G% +.\" +.Dd +.Dt GETPW 3 +.Os +.Sh NAME +.Nm getpw +.Nd get name from uid +.Sh SYNOPSIS +.Fn getpw uid "char *buf" +.Sh DESCRIPTION +.Bf -symbolic +The getpw function is made obsolete by getpwuid(3). .br It is available from the compatibility library, libcompat. -.ft R -.PP -.I Getpw -searches the password file for -the (numerical) -.IR uid ", and fills in " "buf" -with the corresponding line; -it returns non-zero if -.IR uid "" -could not -be found. -The line is null-terminated. -.SH FILES -/etc/passwd -.SH "SEE ALSO" -getpwent(3), -passwd(5) -.SH DIAGNOSTICS -Non-zero -return on error. +.Ef +.Pp +The +.Fn getpw +function reads the file +.Pa /etc/passwd , +and if it finds +the specified +.Fa uid , +copies the password entry line into the string pointed to by +.Fa buf . +the null terminated entry line from the password database, +and appends the +.Dv NUL +character. +.Sh RETURN VALUES +The +.Fn getpw +function returns the zero if successful, otherwise +a non-zero if the entry does not exist. +.Sh FILES +.Bl -tag -width /etc/passwd - compact +.It Pa /etc/passwd +.El +.Sh SEE ALSO +.Xr getpwent 3 , +.Xr passwd 5 +.Sh HISTORY +A +.Fn getpw +function appeared in +.At v6 .