Mailing List Archive

A problem with PATH in sshd.c
Dear Sirs,

on my Linux (distribution Slackware 3.9), I have installed the
``openssh-1.2.2.tar.gz'' package into the /usr/local/bin directory.

In the ``sshd.c'' file, the PATH variable is set up:

child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);

(line no. 2405). I am unable to connect to my machine using scp.
_PATH_STDPATH is "/usr/bin:/bin:/usr/sbin:/sbin", but the scp program
dwells in /usr/local/bin. If I try to connect, enter password (etc.,
all OK), then the shell reports it could not find the scp command (not
in PATH) and the connection is closed...

IMHO, an ordinary user does not need to have "/usr/sbin:/sbin" in
his/her PATH.
IMHO, the PATH variable should be set to _PATH_DEFPATH, which is
"/usr/local/bin:/usr/bin:/bin":

child_set_env(&env, &envsize, "PATH", _PATH_DEFPATH);

I have changed it, recompiled the sshd and everything works fine.

Yours faithfully
David Bartl
Re: A problem with PATH in sshd.c [ In reply to ]
Supply --with-default-path=... when running ./configure before compiling
OpenSSH (where `...' is the default path you would like sshd to use
instead of your system's _PATH_STDPATH). No patch necessary.

--
jim knoble
jmknoble@pobox.com

På 2000-Feb-24 klokka 09:06:28 +0100 skrivet David Bartl:

: on my Linux (distribution Slackware 3.9), I have installed the
: ``openssh-1.2.2.tar.gz'' package into the /usr/local/bin directory.
:
: In the ``sshd.c'' file, the PATH variable is set up:
:
: child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
:
: (line no. 2405). I am unable to connect to my machine using scp.
: _PATH_STDPATH is "/usr/bin:/bin:/usr/sbin:/sbin", but the scp program
: dwells in /usr/local/bin. If I try to connect, enter password (etc.,
: all OK), then the shell reports it could not find the scp command (not
: in PATH) and the connection is closed...