Skip Menu |
 

Download (untitled) / with headers
text/plain 1.8KiB
From amu@MIT.EDU Sun Mar 15 14:12:53 1998
Received: from MIT.EDU (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.69.0.28]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id OAA05081 for <bugs@RT-11.MIT.EDU>; Sun, 15 Mar 1998 14:12:53 -0500
Received: from SNORKLEWACKER.MIT.EDU by MIT.EDU with SMTP
id AA13319; Sun, 15 Mar 98 14:13:24 EST
Received: by snorklewacker.mit.edu (8.8.8/4.7) id OAA23270; Sun, 15 Mar 1998 14:12:53 -0500 (EST)
Message-Id: <udlhg4zix8r.fsf@snorklewacker.mit.edu>
Date: 15 Mar 1998 14:12:52 -0500
From: amu@MIT.EDU (Aaron M. Ucko)
To: krb5-bugs@MIT.EDU
Subject: rsh

Show quoted text
>Number: 558
>Category: krb5-appl
>Synopsis: rsh
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: raeburn
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Sun Mar 15 14:13:01 EST 1998
>Last-Modified: Fri Sep 14 10:45:14 EDT 2001
>Originator: Aaron M. Ucko
>Organization:
>Release:
>Environment:
NetBSD
Show quoted text
>Description:

At least on NetBSD, the version of rsh in the krb5 locker seems to
throw away the hostname when falling back to krb4 rsh (cat.mit.edu is
an alias for beastmaster.mit.edu):

; type -all rsh
rsh is /mit/krb5/arch/i386_nbsd1/bin/rsh
rsh is /usr/athena/bin/rsh
rsh is /usr/bin/rsh

; rsh tux cat /dev/null
Couldn't authenticate to server: Bad sendauth version was sent
rsh: kcmd to host tux failed - Bad sendauth version was sent
trying normal rsh (/usr/athena/bin/rsh)
BEASTMASTER.MIT.EDU: Connection refused
Trying krb4 rsh...
BEASTMASTER.MIT.EDU: Connection refused
trying normal rsh (/usr/bin/rsh)
tux.MIT.EDU: Connection refused

--
Aaron M. Ucko, KB1CJC <amu@mit.edu> (finger amu@monk.mit.edu)

Show quoted text
>How-To-Repeat:
>Fix:
>Audit-Trail:

Responsible-Changed-From-To: gnats-admin->raeburn
Responsible-Changed-By: raeburn
Responsible-Changed-When: Tue Jul 6 20:59:32 1999
Responsible-Changed-Why:

I'll take it.

Show quoted text
>Unformatted:
Download (untitled) / with headers
text/plain 3.1KiB
From kenh@cmf.nrl.navy.mil Fri Mar 28 15:07:57 1997
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id PAA10497 for <bugs@RT-11.MIT.EDU>; Fri, 28 Mar 1997 15:07:57 -0500
Received: from ginger.cmf.nrl.navy.mil by MIT.EDU with SMTP
id AA21526; Fri, 28 Mar 97 15:07:56 EST
Received: from elvis.cmf.nrl.navy.mil (kenh@elvis.cmf.nrl.navy.mil [134.207.10.38])
by ginger.cmf.nrl.navy.mil (8.8.5/8.8.5) with ESMTP id PAA11794
for <krb5-bugs@mit.edu>; Fri, 28 Mar 1997 15:07:43 -0500 (EST)
Received: (from kenh@localhost)
by elvis.cmf.nrl.navy.mil (8.8.5/8.8.5) id PAA09564;
Fri, 28 Mar 1997 15:07:53 -0500 (EST)
Message-Id: <199703282007.PAA09564@elvis.cmf.nrl.navy.mil>
Date: Fri, 28 Mar 1997 15:07:53 -0500 (EST)
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Reply-To: kenh@cmf.nrl.navy.mil
To: krb5-bugs@MIT.EDU
Subject: Fallback code for rlogin/rsh is broken
X-Send-Pr-Version: 3.99

Show quoted text
>Number: 405
>Category: krb5-clients
>Synopsis: The fallback code in rlogin/rsh doesn't work in all cases
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Fri Mar 28 15:08:00 EST 1997
>Last-Modified:
>Originator: Ken Hornstein
>Organization:
Navel Research Lab

Show quoted text
>Release: 1.0
>Environment:

System: SunOS elvis 4.1.4 4 sun4c
Architecture: sun4

Show quoted text
>Description:

The rsh/rlogin code to fallback to the regular version of rlogin/rsh
doesn't work all the time. This is because it tries to figure out
the hostname and supplies that as argv[0].

This breaks if you use an option on the command line (ie - it thinks
that -l is a hostname), and it also breaks if you call it something
other than rlogin/rsh (ie - if you call it krlogin/krsh).
Show quoted text
>How-To-Repeat:

Try using Kerberos rlogin with an option to a non-Kerberized host.
Show quoted text
>Fix:

These patches have some fuzz (since there are other changes in there),
but they should be good enough to show what needs to be fixed. Basically
all this does is make sure that argv[0] is "rlogin"/"rsh" as appropriate.

--- appl/bsd/krlogin.c.orig Wed Jan 15 18:23:10 1997
+++ appl/bsd/krlogin.c Wed Mar 12 11:33:46 1997
@@ -1579,14 +1601,13 @@
UCB_RLOGIN);
fflush(stderr);

- host = strrchr(argv[0], '/');
- if (host)
- host++;
- else
- host = argv[0];
- if (!strcmp(host, "rlogin"))
- argv++;
+ argv[0] = "rlogin";

+#ifdef POSIX_SIGNALS
+ sigemptyset(&mask);
+ sigprocmask(SIG_SETMASK, &mask, NULL);
+#endif
+
execv(UCB_RLOGIN, argv);
perror("exec");
exit(1);

--- appl/bsd/krsh.c.orig Thu Nov 7 12:06:59 1996
+++ appl/bsd/krsh.c Wed Mar 12 11:34:32 1997
@@ -559,15 +576,11 @@
* from arglist.
*
* We always want to call the Berkeley rsh as 'host mumble'
+ *
+ * This is broken! Always invoke it as "rsh ..."
*/
- host = strrchr(argv[0], '/');
- if (host)
- host++;
- else
- host = argv[0];
-
- if (!strcmp(host, "rsh"))
- argv++;
+
+ argv[0] = "rsh";

fprintf(stderr,"trying normal rsh (%s)\n",
UCB_RSH);
Show quoted text
>Audit-Trail:
>Unformatted: