GETPASS(3) BSD Programmer's Manual GETPASS(3) NNAAMMEE ggeettppaassss - get a password SSYYNNOOPPSSIISS ##iinncclluuddee <<ppwwdd..hh>> ##iinncclluuddee <<uunniissttdd..hh>> _c_h_a_r _* ggeettppaassss(_c_o_n_s_t _c_h_a_r _*_p_r_o_m_p_t); DDEESSCCRRIIPPTTIIOONN The ggeettppaassss() function displays a prompt to, and reads in a password from, _/_d_e_v_/_t_t_y. If this file is not accessible, ggeettppaassss displays the prompt on the standard error output and reads from the standard input. The password may be up to _PASSWORD_LEN (currently 128) characters in length. Any additional characters and the terminating newline character are discarded. GGeettppaassss turns off character echoing while reading the password. RREETTUURRNN VVAALLUUEESS GGeettppaassss returns a pointer to the null terminated password. FFIILLEESS /dev/tty SSEEEE AALLSSOO crypt(3) HHIISSTTOORRYY A ggeettppaassss function appeared in Version 7 AT&T UNIX. BBUUGGSS The ggeettppaassss function leaves its result in an internal static object and returns a pointer to that object. Subsequent calls to ggeettppaassss will modi- fy the same object. The calling process should zero the password as soon as possible to avoid leaving the cleartext password visible in the process's address space. 4.4BSD June 4, 1993 1