[10829] in Athena Bugs
7.6 Encrypted rcp to non-bsd machines fails
daemon@ATHENA.MIT.EDU (epeisach@Athena.MIT.EDU)
Wed Aug 25 21:02:07 1993
From: epeisach@Athena.MIT.EDU
Date: Wed, 25 Aug 93 21:01:53 -0400
To: op@Athena.MIT.EDU, bugs@Athena.MIT.EDU
Very simply, what is happening is that rcp does the equivalent of
rsh remhost "rcp -x -f /etc/passwd"
This is fine and dandy as long as a version of rcp which deals with
encryption is in the path as tested by:
rsh remhost printenv PATH
Notice that the path is /usr/ucb:/bin:/usr/bin
On the BSD machines, the kerberos rcp is in /usr/ucb - so no problem...
but on the other machines, this is a problem....
What is the fix?
In kerberos/appl/bsd/rshd.c about line 128,
notice the explicit path setting....
In the p10 version of kerberos, this is changed, and should work....
I am supplying a patch... Not the ifdef on SOLARIS can be removed as the
kerberized rcp will be run which will handle the basic services as
well...
This version of kshd is now installed on paris...... (until the machine
is updated... )
The following patches are based on the patch 10 release of kerberos
which we are not using....
RCS file: RCS/Imakefile,v
retrieving revision 1.1
diff -c -r1.1 Imakefile
*** /tmp/,RCSt1a05505 Wed Aug 25 21:01:34 1993
--- Imakefile Wed Aug 25 20:54:46 1993
***************
*** 32,38 ****
#endif
DEFINES= $(RCP) $(RLOGIN) $(RSH) \ @@\
! -DLOGIN_PROGRAM=\"$(DAEMDIR)/login.krb\"
#ifdef SOLARIS
AFSDIR=/usr/transarc
AFSLIBS= $(AFSDIR)/lib/afs/libauth.a $(AFSDIR)/lib/afs/libsys.a $(AFSDIR)/lib/librx.a $(AFSDIR)/lib/liblwp.a
--- 32,38 ----
#endif
DEFINES= $(RCP) $(RLOGIN) $(RSH) \ @@\
! -DLOGIN_PROGRAM=\"$(DAEMDIR)/login.krb\" -DKPROGDIR=\"$(PROGDIR)\"
#ifdef SOLARIS
AFSDIR=/usr/transarc
AFSLIBS= $(AFSDIR)/lib/afs/libauth.a $(AFSDIR)/lib/afs/libsys.a $(AFSDIR)/lib/librx.a $(AFSDIR)/lib/liblwp.a
===================================================================
RCS file: RCS/rshd.c,v
retrieving revision 1.1
diff -c -r1.1 rshd.c
*** /tmp/,RCSt1a05505 Wed Aug 25 21:01:34 1993
--- rshd.c Wed Aug 25 20:53:21 1993
***************
*** 124,135 ****
char username[20] = "USER=";
char homedir[64] = "HOME=";
char shell[64] = "SHELL=";
char *envinit[] =
! #ifdef SOLARIS
! {homedir, shell, "PATH=:/usr/bin:/usr/ucb", username, 0};
! #else
! {homedir, shell, "PATH=:/usr/ucb:/bin:/usr/bin", username, 0};
! #endif
extern char **environ;
doit(f, fromp)
--- 124,133 ----
char username[20] = "USER=";
char homedir[64] = "HOME=";
char shell[64] = "SHELL=";
+ char path[128] = "PATH=";
+ char path_rest[64] = ":/usr/ucb:/bin:/usr/bin";
char *envinit[] =
! {homedir, shell, path, username, 0};
extern char **environ;
doit(f, fromp)
***************
*** 376,381 ****
--- 374,381 ----
strncat(homedir, pwd->pw_dir, sizeof(homedir)-6);
strncat(shell, pwd->pw_shell, sizeof(shell)-7);
strncat(username, pwd->pw_name, sizeof(username)-6);
+ strcat(path, KPROGDIR);
+ strcat(path, path_rest);
cp = rindex(pwd->pw_shell, '/');
if (cp)
cp++;