.\" -*- coding: UTF-8 -*- .\" Copyright (c) 2000 Andries Brouwer (aeb@cwi.nl) .\" .\" %%%LICENSE_START(GPLv2+_DOC_FULL) .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, see .\" . .\" %%%LICENSE_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH GETPASS 3 "6 Marzo 2019" Linux "Manual del Programador de Linux" .SH NOMBRE getpass \- obtiene una contraseña .SH SINOPSIS \fB#include \fP .PP \fBchar *getpass(const char *\fP\fIprompt\fP\fB);\fP .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBgetpass\fP(): .ad l .RS 4 .PD 0 .TP 4 Desde glibc 2.2.2: .nf _XOPEN_SOURCE && ! (_POSIX_C_SOURCE\ >=\ 200112L) || /* Glibc since 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _BSD_SOURCE .fi .TP 4 Antes de glibc 2.2.2: none .PD .RE .ad b .SH 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 \fIECHO\fP flag in \fBtermios\fP(3). .PP La función \fBgetpass\fP() abre el fichero \fI/dev/tty\fP (la terminal de control del proceso), escribe la cadena \fIprompt\fP, desactiva el eco, lee una linea (la "contraseña"), restablece el estado de la terminal y cierra \fI/dev/tty\fP de nuevo. .SH "VALOR DEVUELTO" The function \fBgetpass\fP() returns a pointer to a static buffer containing (the first \fBPASS_MAX\fP bytes of) the password without the trailing newline, terminated by a null byte (\(aq\e0\(aq). This buffer may be overwritten by a following call. On error, the terminal state is restored, \fIerrno\fP is set appropriately, and NULL is returned. .SH ERRORES La función puede fallar si .TP \fBENXIO\fP El proceso no tiene una terminal de control. .SH ARCHIVOS .\" .SH HISTORY .\" A .\" .BR getpass () .\" function appeared in Version 7 AT&T UNIX. \fI/dev/tty\fP .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interfaz Atributo Valor T{ \fBgetpass\fP() T} Seguridad del hilo MT\-Unsafe term .TE .SH "CONFORME A" Present in SUSv2, but marked LEGACY. Removed in POSIX.1\-2001. .SH NOTAS .\" For libc4 and libc5, the prompt is not written to .\" .I /dev/tty .\" but to .\" .IR stderr . .\" Moreover, if .\" .I /dev/tty .\" cannot be opened, the password is read from .\" .IR stdin . .\" The static buffer has length 128 so that only the first 127 .\" bytes of the password are returned. .\" While reading the password, signal generation .\" .RB ( SIGINT , .\" .BR SIGQUIT , .\" .BR SIGSTOP , .\" .BR SIGTSTP ) .\" is disabled and the corresponding characters .\" (usually control-C, control-\e, control-Z and control-Y) .\" are transmitted as part of the password. .\" Since libc 5.4.19 also line editing is disabled, so that also .\" backspace and the like will be seen as part of the password. . In the GNU C library implementation, if \fI/dev/tty\fP cannot be opened, the prompt is written to \fIstderr\fP and the password is read from \fIstdin\fP. There is no limit on the length of the password. Line editing is not disabled. .PP .\" Libc4 and libc5 have never supported .\" .B PASS_MAX .\" or .\" .BR _SC_PASS_MAX . According to SUSv2, the value of \fBPASS_MAX\fP must be defined in \fI\fP in case it is smaller than 8, and can in any case be obtained using \fIsysconf(_SC_PASS_MAX)\fP. However, POSIX.2 withdraws the constants \fBPASS_MAX\fP and \fB_SC_PASS_MAX\fP, and the function \fBgetpass\fP(). The glibc version accepts \fB_SC_PASS_MAX\fP and returns \fBBUFSIZ\fP (e.g., 8192). .SH 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. .SH "VÉASE TAMBIÉN" \fBcrypt\fP(3) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. 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/. .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Gerardo Aburruzaga García , Miguel Pérez Ibars y Marcos Fouces . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .