[10531] in Athena Bugs

home help back first fref pref prev next nref lref last post

rshd.c -r4.17, environ misdeclared

daemon@ATHENA.MIT.EDU ("Mark W. Eichin")
Thu Jun 3 18:51:29 1993

Date: Thu, 3 Jun 93 18:51:22 EDT
From: eichin@Athena.MIT.EDU ("Mark W. Eichin")
To: bugs@Athena.MIT.EDU
Cc: sipb-staff@Athena.MIT.EDU

% rsh charon.mit.edu printenv
HOME=/
PATH=/bin:/usr/ucb:/usr/bin

/afs/rel-eng/project/release/current/source/athena/athena.lib/kerberos/appl/bsd/rshd.c
line 133:
char	**environ;

Turns out that the Ultrix linker+libc are *way* clever... without the
extern, you actually a fresh new local variable which has *no*
connection with the "real" one. This means that rshd puts *nothing*
into the environment, so it inherits from what inetd had at boot time.

The fix is the obvious:
extern char	**environ;

which is portable to all of the relevant platforms. I believe this
manifestation is only visible under MIPS Ultrix.
	Alternate fix is to actually use the kerberos.p10 source instead.

				_Mark_ <eichin@athena.mit.edu>
				MIT Student Information Processing Board
				Cygnus Support <eichin@cygnus.com>

home help back first fref pref prev next nref lref last post