oracular (3) getpass.3.gz

Provided by: manpages-es-dev_4.23.1-1_all bug

NOMBRE

       getpass - obtiene una contraseña

BIBLIOTECA

       Biblioteca Estándar C (libc, -lc)

SINOPSIS

       #include <unistd.h>

       [[a extinguir]] char *getpass(const char *prompt);

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

       getpass():
           A partir de glibc 2.2.2:
               _XOPEN_SOURCE && ! (_POSIX_C_SOURCE >= 200112L)
                   || /* glibc >= 2.19: */ _DEFAULT_SOURCE
                   || /* glibc <= 2.19: */ _BSD_SOURCE
           Antes de glibc 2.2.2:
               nada

DESCRIPCIÓN

       This  function  is  obsolete.   Do  not  use  it.  See NOTES.  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 línea (la "contraseña"), restablece el estado de la terminal y cierra
       /dev/tty de nuevo.

VALOR DEVUELTO

       La función getpass() devuelve un puntero a un buffer estático que contiene (los primeros  PASS_MAX  bytes
       de)  la  contraseña  sin  el  carácter  nueva  línea, terminada en NULL ('\0[aq]).  Este buffer puede ser
       sobreescrito por una llamada posterior.  En caso de error, el estado de la  terminal  se  restablece,  se
       pone un valor adecuado en errno, y se devuelve NULL.

ERRORES

       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 │
       └──────────────────────────────────────────────────────────────────┴────────────────────┴────────────────┘

ESTÁNDARES

       None.

HISTORIAL

       Version 7 AT&T UNIX.  Present in SUSv2, but marked LEGACY.  Removed in POSIX.1-2001.

NOTAS

       You should use instead readpassphrase(3bsd), provided by libbsd.

       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)

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>, Miguel Pérez Ibars <mpi79470@alu.um.es> y Marcos Fouces <marcos@debian.org>

       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⟩.