getpass(3) Library Functions Manual getpass(3) NOMBRE getpass - obtiene una contrasena BIBLIOTECA Biblioteca Estandar C (libc, -lc) SINOPSIS #include [[a extinguir]] char *getpass(const char *prompt); Requisitos de Macros de Prueba de Caracteristicas para glibc (vease 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 DESCRIPCION 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 funcion getpass() abre el fichero /dev/tty (la terminal de control del proceso), escribe la cadena prompt, desactiva el eco, lee una linea (la "contrasena"), restablece el estado de la terminal y cierra /dev/tty de nuevo. VALOR DEVUELTO La funcion getpass() devuelve un puntero a un buffer estatico que contiene (los primeros PASS_MAX bytes de) la contrasena sin el caracter nueva linea, 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 explicacion de los terminos usados en esta seccion, vease attributes(7). +--------------------------------+--------------------+----------------+ |Interfaz | Atributo | Valor | +--------------------------------+--------------------+----------------+ |getpass() | Seguridad del hilo | MT-Unsafe term | +--------------------------------+--------------------+----------------+ ESTANDARES 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 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 funcion deberia poner a cero todos los caracteres de la contrasena tan pronto como le fuera posible para evitar dejar la contrasena sin cifrar visible en el espacio de direcciones del proceso. VEASE TAMBIEN crypt(3) TRADUCCION La traduccion al espanol de esta pagina del manual fue creada por Gerardo Aburruzaga Garcia , Miguel Perez Ibars y Marcos Fouces Esta traduccion es documentacion libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. Si encuentra algun error en la traduccion de esta pagina del manual, envie un correo electronico a . Paginas de manual de Linux 6.06 31 Octubre 2023 getpass(3)