.TH getpass() "" "" "General Function (libc)"
.PC "Get password with prompting"
\fBchar *getpass(\fIprompt\^\fB)\fR
\fBchar *\fIprompt\^\fB;\fR
.PP
.B getpass()
first prints the
.IR prompt .
Then it disables echoing of input characters on the terminal device
(either the file
.B /dev/tty
or the standard input),
reads a password from it,
and restores echoing on the terminal.
It returns the given password.
.SH Files
.B /dev/tty
.SH "See Also"
.Xr "crypt()," crypt.g
.Xr "libc," libc
.Xr "login," login
.Xr "passwd," passwd
.Xr "su" su
.SH Notes
The password is stored in a static location
that is overwritten by successive calls.
This static buffer is 50 characters long; any password longer than that
can cause problems of one sort or another.
