Репозитории ALT
S: | 4.0.20100725-alt3 |
5.1: | 4.0.20061122-alt2 |
4.1: | 4.0.20061122-alt1 |
4.0: | 4.0.20061122-alt1 |
3.0: | 3.6-alt2 |
Группа :: Сети/Прочее
Пакет: netcat
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: netcat-4.0.20061122-alt-rpp.patch
Скачать
Скачать
--- netcat-4.0.20061122/usr.bin/nc/socks.c
+++ netcat-4.0.20061122/usr.bin/nc/socks.c
@@ -38,7 +38,9 @@
#include <string.h>
#include <unistd.h>
#include <resolv.h>
+#if defined(HAVE_READPASSPHRASE)
#include <readpassphrase.h>
+#endif
#include "atomicio.h"
#define SOCKS_PORT "1080"
@@ -113,11 +115,19 @@ static const char *
getproxypass(const char *proxyuser, const char *proxyhost)
{
char prompt[512];
+#if defined(HAVE_READPASSPHRASE)
static char pw[256];
+#else
+ char *pw;
+#endif
snprintf(prompt, sizeof(prompt), "Proxy password for %s@%s: ",
proxyuser, proxyhost);
+#if defined(HAVE_READPASSPHRASE)
if (readpassphrase(prompt, pw, sizeof(pw), RPP_REQUIRE_TTY) == NULL)
+#else
+ if ((pw = getpass(prompt)) == NULL)
+#endif
errx(1, "Unable to read proxy passphrase");
return (pw);
}