Provided by: manpages-es-dev_4.13-4_all bug

NOMBRE

       getpass - obtiene una contraseña

SINOPSIS

       #include <unistd.h>

       char *getpass(const char *prompt);

   Requisitos de Macros de Prueba de Características para glibc (véase feature_test_macros(7)):

       getpass():
           Desde glibc 2.2.2:
               _XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)
                   || /* Glibc since 2.19: */ _DEFAULT_SOURCE
                   || /* Glibc versions <= 2.19: */ _BSD_SOURCE
           Antes de glibc 2.2.2:
               none

DESCRIPCIÓN

       This  function  is  obsolete.   Do not use it.  If you want to read input without terminal
       echoing enabled, see the description of the ECHO flag in termios(3).

       La función getpass()  abre el fichero /dev/tty  (la  terminal  de  control  del  proceso),
       escribe la cadena prompt, desactiva el eco, lee una linea (la "contraseña"), restablece el
       estado de la terminal y cierra /dev/tty de nuevo.

VALOR DEVUELTO

       The function getpass()  returns a  pointer  to  a  static  buffer  containing  (the  first
       PASS_MAX  bytes  of)  the password without the trailing newline, terminated by a null byte
       ('\0').  This buffer may be overwritten by a following call.  On error, the terminal state
       is restored, errno is set appropriately, and NULL is returned.

ERRORES

       La función puede fallar si

       ENXIO  El proceso no tiene una terminal de control.

ARCHIVOS

       /dev/tty

ATRIBUTOS

       Para obtener una explicación de los términos usados en esta sección, véase attributes(7).

       ┌──────────┬────────────────────┬────────────────┐
       │InterfazAtributoValor          │
       ├──────────┼────────────────────┼────────────────┤
       │getpass() │ Seguridad del hilo │ MT-Unsafe term │
       └──────────┴────────────────────┴────────────────┘

CONFORME A

       Present in SUSv2, but marked LEGACY.  Removed in POSIX.1-2001.

NOTAS

       In  the  GNU C library implementation, if /dev/tty cannot be opened, the prompt is written
       to stderr and the password is read from stdin.  There is no limit on  the  length  of  the
       password.  Line editing is not disabled.

       According  to  SUSv2,  the  value  of PASS_MAX must be defined in <limits.h> in case it is
       smaller than 8, and can in any case be  obtained  using  sysconf(_SC_PASS_MAX).   However,
       POSIX.2  withdraws  the  constants  PASS_MAX and _SC_PASS_MAX, and the function getpass().
       The glibc version accepts _SC_PASS_MAX and returns BUFSIZ (e.g., 8192).

ERRORES

       El proceso que llama a esta función debería poner  a  cero  todos  los  caracteres  de  la
       contraseña  tan  pronto  como  le fuera posible para evitar dejar la contraseña sin cifrar
       visible en el espacio de direcciones del proceso.

VÉASE TAMBIÉN

       crypt(3)

COLOFÓN

       Esta página es parte de la versión 5.10 del proyecto Linux man-pages. Puede encontrar  una
       descripción  del  proyecto, información sobre cómo informar errores y la última versión de
       esta página en https://www.kernel.org/doc/man-pages/.

TRADUCCIÓN

       La traducción al español de esta página del  manual  fue  creada  por  Gerardo  Aburruzaga
       García <gerardo.aburruzaga@uca.es> y Miguel Pérez Ibars <mpi79470@alu.um.es>

       Esta  traducción  es  documentación  libre;  lea  la  GNU General Public License Version 3
       ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩ o posterior con respecto a las condiciones  de
       copyright.  No existe NINGUNA RESPONSABILIDAD.

       Si  encuentra  algún  error  en  la  traducción de esta página del manual, envíe un correo
       electrónico a debian-l10n-spanish@lists.debian.org ⟨⟩.