Commit | Line | Data |
---|---|---|
e643a577 | 1 | .\" @(#)getpass.3 6.2 (Berkeley) %G% |
0adf1b99 | 2 | .\" |
b04476bf | 3 | .TH GETPASS 3 "" |
0adf1b99 KM |
4 | .AT 3 |
5 | .SH NAME | |
6 | getpass \- read a password | |
7 | .SH SYNOPSIS | |
8 | .nf | |
9 | .B char *getpass(prompt) | |
10 | .B char *prompt; | |
11 | .fi | |
12 | .SH DESCRIPTION | |
13 | .I Getpass | |
14 | reads a password from the file | |
15 | .IR /dev/tty , | |
16 | or if that cannot be opened, from the standard input, | |
17 | after prompting with the null-terminated string | |
18 | .I prompt | |
19 | and disabling echoing. | |
20 | A pointer is returned to a null-terminated string | |
21 | of at most 8 characters. | |
e643a577 KF |
22 | A calling process should zero the password as soon |
23 | as possible to avoid leaving the cleartext password | |
24 | visible in the process' address space. | |
0adf1b99 KM |
25 | .SH FILES |
26 | /dev/tty | |
27 | .SH "SEE ALSO" | |
28 | crypt(3) | |
29 | .SH BUGS | |
30 | The return value points to static data | |
31 | whose content is overwritten by each call. |