Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37564543
en ru br
Репозитории ALT
S:0.17-alt5.1
4.1: 0.17-alt2
4.0: 0.17-ipl9mdk
3.0: 0.17-ipl9mdk
www.altlinux.org/Changes

Группа :: Сети/Удалённый доступ
Пакет: rsh

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: netkit-rsh-0.17-nohost.patch
Скачать


--- netkit-rsh-0.17/rexecd/rexecd.8.nohost	2004-12-03 15:20:17.436174216 +0100
+++ netkit-rsh-0.17/rexecd/rexecd.8	2004-12-03 15:39:39.972441840 +0100
@@ -40,6 +40,16 @@
 .Nd remote execution server
 .Sh SYNOPSIS
 .Nm rexecd
+[
+\fB\-D\fP
+]
+.Sh OPTIONS
+.Nm Rexec
+accepts one option:
+.Pp
+.Bl -tag -width Ds
+.It Sy -D
+Disable reverse DNS look up and in the log will be used client IP addresses.
 .Sh DESCRIPTION
 .Nm Rexecd
 is the server for the 
--- netkit-rsh-0.17/rexecd/rexecd.c.nohost	2004-12-03 15:09:37.163510456 +0100
+++ netkit-rsh-0.17/rexecd/rexecd.c	2004-12-03 15:20:04.832090328 +0100
@@ -82,7 +82,9 @@
 #include <string.h>
 #include <paths.h>
 #include <grp.h>
-
+#include <arpa/inet.h>
+  
+  
 #ifdef USE_SHADOW
 #include <shadow.h>
 #endif
@@ -141,16 +143,22 @@
 		refuse(&from_host);
 	remote = hosts_info(&from_host);
 #else
+	if (argc > 1 && argv[1] && strcmp(argv[1], "-D")==0)
 	{
-	struct hostent *h = gethostbyaddr((const char *)&from.sin_addr,
-					  sizeof(struct in_addr),
-					  AF_INET);
-	if (!h || !h->h_name) {
-		write(0, "\1Where are you?\n", 16);
-		return 1;
+		/* use IP in logs -- this is workaround */
+		remote = strdup(inet_ntoa(from.sin_addr));
 	}
-	/* Be advised that this may be utter nonsense. */
-	remote = strdup(h->h_name);
+	else
+	{
+		struct hostent *h = gethostbyaddr((const char *)&from.sin_addr,
+				  sizeof(struct in_addr),
+				  AF_INET);
+		if (!h || !h->h_name) {
+			write(0, "\1Where are you?\n", 16);
+			return 1;
+		}
+		/* Be advised that this may be utter nonsense. */
+		remote = strdup(h->h_name);
 	}
 #endif
 	syslog(allow_severity, "connect from %.128s", remote);
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin