GETPASS(3) Linux Programmer's Manual GETPASS(3)
NAME
getpass - get a password
SYNOPSIS
#include <unistd.h>
char *getpass( const char *prompt);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
getpass():
Since glibc 2.2.2:
_BSD_SOURCE ||
(_XOPEN_SOURCE >= 500 ||
_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) &&
!(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600)
Before glibc 2.2.2: none
DESCRIPTION
This function is obsolete. Do not use it.
The getpass() function opens /dev/tty (the controlling terminal of the process), outputs the string prompt, turns off echoing, reads one
line (the "password"), restores the terminal state and closes /dev/tty again.
RETURN VALUE
The function getpass() returns a pointer to a static buffer containing (the first PASS_MAX bytes of) the password without the trailing new-
line, terminated by a null byte ('