[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#464513: marked as done (Add "-c" argument to rexecd in order to accept any client)



Your message dated Wed, 31 Jan 2024 18:38:44 +0000
with message-id <[🔎] E1rVFTw-00GtFr-JD@fasolo.debian.org>
and subject line Bug#1041864: Removed package(s) from unstable
has caused the Debian Bug report #464513,
regarding Add "-c" argument to rexecd in order to accept any client
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
464513: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=464513
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: netkit-rsh
Version: 0.17-14
Severity: wishlist
Tags: patch

Hi,
I am using a linux server with an application accessed via rexec from
many windows clients. These clients aren't recorded in any DNS, and
obtain their IP addresses vi dhcp.

The current rexecd implementation in netkit require client to be
registered in a DNS, otherwise print error "Where are you?". AIX version
on rexecd has an option, -c, that skip this control, and accept any
client. (The AIX manual page is available here:
http://www.ncsa.uiuc.edu/UserInfo/Resources/Hardware/IBMp690/IBM/usr/share/man/info/en_US/a_doc_lib/cmds/aixcmds4/rexecd.htm)

I wrote a patch for adding this option to the netkit implementation
(both code and manual page). I would like to submit it for inclusion in
the Debian package.

Thanks a lot,
Giuseppe
diff -ruN netkit-rsh-0.17/rexecd/rexecd.8 netkit-rsh-0.17.new/rexecd/rexecd.8
--- netkit-rsh-0.17/rexecd/rexecd.8	2000-07-31 01:57:04.000000000 +0200
+++ netkit-rsh-0.17.new/rexecd/rexecd.8	2008-02-07 10:41:40.000000000 +0100
@@ -39,7 +39,7 @@
 .Nm rexecd
 .Nd remote execution server
 .Sh SYNOPSIS
-.Nm rexecd
+.Nm rexecd [\-c]
 .Sh DESCRIPTION
 .Nm Rexecd
 is the server for the 
@@ -56,6 +56,12 @@
 is initiated:
 .Bl -enum
 .It
+The server verify that the client has a valid hostname
+associated in DNS, unless option \fB\-c\fP is specified.
+If the client machine isn't accepted at this stage, the
+error message 'Where are you?' is returned to the client
+machine.
+.It
 The server reads characters from the socket up
 to a NUL
 .Pq Ql \e0
@@ -64,7 +70,7 @@
 .Tn ASCII
 number, base 10.
 .It 
-If the number received in step 1 is non-zero,
+If the number received in step 2 is non-zero,
 it is interpreted as the port number of a secondary
 stream to be used for the 
 .Em stderr .
diff -ruN netkit-rsh-0.17/rexecd/rexecd.c netkit-rsh-0.17.new/rexecd/rexecd.c
--- netkit-rsh-0.17/rexecd/rexecd.c	2008-02-07 10:43:16.000000000 +0100
+++ netkit-rsh-0.17.new/rexecd/rexecd.c	2008-02-07 10:20:51.000000000 +0100
@@ -120,8 +120,10 @@
 	struct sockaddr_storage from;
 	struct sockaddr *const fromp = (void *)&from;
 	socklen_t fromlen;
+	int namerequired = 1;
 
-	(void)argc;
+	if (argc>1)
+		namerequired = strcmp("-c", argv[1]);
 
 	fromlen = sizeof(from);
  
@@ -150,9 +152,21 @@
 #else
 	{
 	char hbuf[NI_MAXHOST];
+	int i;
 
-	if (getnameinfo(fromp, fromlen,
-			hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD)) {
+	i = getnameinfo(fromp, fromlen,
+			hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD);
+	if (i && !namerequired) {
+                long unsigned int ad4 = ((struct sockaddr_in *)fromp)->sin_addr.s_addr;
+                if (from.ss_family == AF_INET6)
+                        syslog(LOG_ERR, "getnameinfo(family=AF_INET6) failed with code %d (%s).", i, gai_strerror(i));
+                else {
+                        sprintf(hbuf,"%lu.%lu.%lu.%lu", ad4&0xff, (ad4>>8)&0xff, (ad4>>16)&0xff, (ad4>>24)&0xff);
+                        i = getnameinfo(fromp, fromlen, hbuf, sizeof(hbuf), NULL, 0, 0);
+                }
+	}
+
+	if (i) {
 		write(0, "\1Where are you?\n", 16);
 		return 1;
 	}

--- End Message ---
--- Begin Message ---
Version: 0.17-24+rm

Dear submitter,

as the package netkit-rsh has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1041864

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Thorsten Alteholz (the ftpmaster behind the curtain)

--- End Message ---

Reply to: