scp : Problems with pathing

Tuc tuc at
Sun Mar 31 04:48:30 EST 2002

> > > E-mail me privately your config.h, config.log and the configure
> > > command line you used. And what platform is this again?
> > >
> > 	BSD/OS, 4.0.1 and 4.1
> Here is what's going on.
> Your config.h has
> #define HAVE_LOGIN_CAP_H 1
> --------< defines.h >-------
> #if defined(HAVE_LOGIN_GETCAPBOOL) && defined(HAVE_LOGIN_CAP_H)
> # define HAVE_LOGIN_CAP
> #endif
> ----------------------------
> -----< session.c >----- (edited)
>                 (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH);
>                 child_set_env(&env, &envsize, "PATH", getenv("PATH"));
> #else /* HAVE_LOGIN_CAP */
>                 child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
> #endif /* HAVE_LOGIN_CAP */
> ---------------------------
> So the path you want, "_PATH_STDPATH" will not be used.
> I'm not sure what to do about it. I have no BSD here.
	Ok. So, then if I have HAVE_LOGIN_CAP_H, then it must be
picking up the getenv("PATH") of the user.  When I log on as the user, I
get :

MACHINE:/usr/home/USER $ echo $PATH
MACHINE:/usr/home/USER $ which scp

	Hrm, but I just realized, maybe there is .XXXrc fiddling with that.
Let me check what an ID with none of that has...

MACHINE# su - scptest
su-2.02$ echo $PATH

	Looks awfully familiar! I never tried the /usr/X11/bin, but something
tells me its fine.

	As for what to do about it, which would be better for it to do?
Abide by users path, or the compiled in path?  On BSD/OS, it seems to take
it from the /etc/login.conf before it gets modified by .XXXrc's.

# The default values
# To alter the default authentication types change the line:
#       :tc=auth-bsdi-defaults:\
# to be read something like: (enables passwd, "myauth", and activ)
#       :auth=passwd,myauth,activ:\
# Any value changed in the daemon class should be reset in default
# class.
        :path=/bin /usr/bin /usr/contrib/bin /usr/X11/bin:\

		Thanks for the help, atleast we know whats

		Thanks, Tuc/TTSG Internet Services, Inc.

More information about the openssh-unix-dev mailing list