*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> getpass (3)              
Title
Content
Arch
Section
 

getpass(3)

Contents


NAME    [Toc]    [Back]

       getpass - Reads a password

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       char *getpass(
               const char *prompt );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       getpass():  XSH4.2

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Points to the prompt string that is written to stderr.

DESCRIPTION    [Toc]    [Back]

       The getpass() function opens the process' controlling terminal
 file, flushes output, disables echoing, and reads up
       to  a newline character or an end-of-file (EOF) character.
       The terminal state is then restored  and  the  controlling
       terminal is closed.

       If  the  getpass()  function  is interrupted by the SIGINT
       signal, the terminal state is restored before  the  signal
       is delivered to the calling process.

NOTES    [Toc]    [Back]

       [Tru64  UNIX]  The  getpass()  function  is not threadsafe
       because it manipulates global signal state.

       The getpass() function is scheduled to be withdrawn from a
       future version of the X/Open CAE Specification.

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, the getpass() function returns
       a pointer string of no more than  PASS_MAX  bytes  plus  a
       terminating  null  value. This return value points to data
       that is overwritten by successive calls. If  the  controlling
 terminal file cannot be opened, the terminal state is
       restored and a null pointer is returned.

ERRORS    [Toc]    [Back]

       The getpass() function sets errno to the specified  values
       for the following conditions: [Tru64 UNIX]  Search permission
 is denied on a component of the pathname  prefix;  or
       the  file exists and the permissions specified by the mode
       parameter are denied; or the file does not exist and write
       permission  is denied for the parent directory of the file
       to be created.  The function was interrupted by  a  signal
       that  was caught.  Too many file descriptors are currently
       open in the calling process (exceeding OPEN_MAX).

              [Tru64 UNIX]  Either the OPEN_MAX value or the perprocess
 soft descriptor limit is checked.  Too many
              files are currently open  in  the  system.   [Tru64
              UNIX]  The  named  file  does not exist or the path
              parameter points to an empty string.   The  process
              does not have a controlling terminal.

SEE ALSO    [Toc]    [Back]

      
      
       Functions: fopen(3).

       Files: tty(7), termios(4).

       Standards: standards(5)



                                                       getpass(3)
[ Back ]
 Similar pages
Name OS Title
yppasswd Tru64 Update user password in Network Information Service (NIS) password map.
passwd IRIX change login password and password attributes
cd_cptrec Tru64 reads the Path Table Record from the
cd_xar Tru64 reads the Extended Attribute Record for
cd_cpvd Tru64 reads the Primary Volume Descriptor from
cd_pvd Tru64 reads the Primary Volume Descriptor from
read Tru64 Reads a line from standard input
line Tru64 Reads one line from standard input
blkqread IRIX reads multiple entries from the queue
getdev IRIX reads a list of valuators at one time
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service