зеркало из https://github.com/mozilla/pjs.git
Fix for 164471 - Hide passwords in NSS command-line tools on OS/2
This commit is contained in:
Родитель
7f79a6f4eb
Коммит
75c4fb32e1
|
@ -46,11 +46,7 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef XP_OS2_VACPP
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WINDOWS) && !defined(_WIN32_WCE)
|
||||
#if( defined(_WINDOWS) && !defined(_WIN32_WCE)) || defined(XP_OS2_VACPP)
|
||||
#include <conio.h>
|
||||
#include <io.h>
|
||||
#define QUIET_FGETS quiet_fgets
|
||||
|
@ -159,7 +155,7 @@ PRBool SEC_BlindCheckPassword(char *cp)
|
|||
|
||||
/* Get a password from the input terminal, without echoing */
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#if defined(_WINDOWS) || defined(XP_OS2_VACPP)
|
||||
static char * quiet_fgets (char *buf, int length, FILE *input)
|
||||
{
|
||||
int c;
|
||||
|
@ -168,9 +164,15 @@ static char * quiet_fgets (char *buf, int length, FILE *input)
|
|||
/* fflush (input); */
|
||||
memset (buf, 0, length);
|
||||
|
||||
#ifndef XP_OS2_VACPP
|
||||
if (input != stdin) {
|
||||
return fgets(buf,length,input);
|
||||
}
|
||||
#else
|
||||
if (!isatty(fileno(input))) {
|
||||
return fgets(buf,length,input);
|
||||
}
|
||||
#endif
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче