unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

GETPASS(3V)                                                        GETPASS(3V)



NAME
       getpass - read a password

SYNOPSIS
       char *getpass(prompt)
       char *prompt;

DESCRIPTION
       getpass()  reads  up  to a NEWLINE or EOF from the file /dev/tty, or if
       that cannot be opened, from the standard input,  after  prompting  with
       the  null-terminated string prompt and disabling echoing.  A pointer is
       returned to a null-terminated string  of  at  most  8  characters.   An
       interrupt  will  terminate  input  and  send an interrupt signal to the
       calling program before returning.

SYSTEM V DESCRIPTION
       If /dev/tty cannot be opened, getpass() returns  a  NULL  pointer.   It
       does not read the standard input.

FILES
       /dev/tty

SEE ALSO
       crypt(3)

NOTES
       The  above routine uses <&lt;stdio.h>&gt;, which increases the size of programs
       not otherwise using standard I/O, more than might be expected.

BUGS
       The return value points to static data whose content is overwritten  by
       each call.



                                6 October 1989                     GETPASS(3V)