.\" -*- 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 mars 2019" Linux "Manuel du programmeur Linux" .SH NOM getpass \- Obtenir un mot de passe (password) .SH SYNOPSIS \fB#include \fP .PP \fBchar *getpass(const char *\fP\fIprompt\fP\fB);\fP .PP .RS -4 Exigences de macros de test de fonctionnalités pour la glibc (consulter \fBfeature_test_macros\fP(7))\ : .RE .PP \fBgetpass\fP()\ : .ad l .RS 4 .PD 0 .TP 4 Depuis 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 Avant la glibc 2.2.2\ : aucun .PD .RE .ad b .SH DESCRIPTION Cette fonction est obsolète. Ne l'utilisez pas. Si vous voulez lire une entrée de terminal sans écho local, consultez la description du drapeau \fIECHO\fP dans \fBtermios\fP(3). .PP La fonction \fBgetpass\fP() ouvre \fI/dev/tty\fP (le terminal de contrôle du processus) affiche le message d'accueil \fIprompt\fP, éteint l'écho local, lit une ligne (le mot de passe), puis restaure l'état de \fI/dev/tty\fP et le referme. .SH "VALEUR RENVOYÉE" La fonction \fBgetpass\fP() renvoie un pointeur sur une chaîne de caractères allouée statiquement contenant les \fBPASS_MAX\fP premiers caractères du mot de passe sans le retour chariot final, terminé par un caractère nul («\ \e0\ »). Ce tampon peut être écrasé par un autre appel. En cas d'erreur, l'état du terminal est restauré, \fIerrno\fP est rempli, et la fonction renvoie NULL. .SH ERREURS La fonction peut échouer dans les cas suivants\ : .TP \fBENXIO\fP Le processus n'a pas de terminal de contrôle. .SH FICHIERS .\" .SH HISTORY .\" A .\" .BR getpass () .\" function appeared in Version 7 AT&T UNIX. \fI/dev/tty\fP .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interface Attribut Valeur T{ \fBgetpass\fP() T} Sécurité des threads MT\-Unsafe term .TE .SH CONFORMITÉ Présent dans SUSv2, mais marquée «\ LEGACY\ ». Supprimé de POSIX.1\-2001. .SH NOTES .\" 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 BOGUES Le processus appelant doit effacer le mot de passe saisi aussi vite que possible, afin d'éviter d'en conserver une copie en texte clair dans son espace d'adressage. .SH "VOIR AUSSI" \fBcrypt\fP(3) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier et David Prévot . .PP Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. .PP Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .