further problems Re: scp not found with solaris 8/2.1.0p2

Tom Bertelson tbert at abac.com
Thu May 25 01:57:13 EST 2000

Richard June wrote:
> This is an ongoing problem  if you don't compile w/ --prefix=/usr or
> --prefix=/ is there anyway to fix this for good?
> _PATH_STDPATH is what isn't being defined correctly, if you make these
> modifacations to Makefile and to sshd.c after you've run configure,
> things should work.
> add -DBIN_PREFIX=\"$(bindir)\" to the PATHS line in Makefile like this...
> PATHS=-DBIN_PREFIX=\"$(bindir)\" -DETCDIR=\"$(sysconfdir)\"
> then add these lines to sshd.c after all the #includes, I put them around
> line 40
> #ifdef _PATH_STDPATH
> #undef _PATH_STDPATH
> #endif /* _PATH_STDPATH */
> #define _PATH_STDPATH BIN_PREFIX ":/bin:/usr/bin:/sbin:/usr/sbin"
> and *DON'T* configure OpenSSH to use Login.
> This should work with OpenSSH version 1.2.3, I dunno for sure, mostly this
> is theory based on what I've seen. I have no idea if it's even applicable
> to OpenSSH 2.x, Good luck.

There's still a problem.  If you have the files /etc/environment or
$HOME/.ssh/environment and they contain a definition for PATH, this
overrides the compiled-in path.

Perhaps sshd should always append BIN_PREFIX or _PATH_STDPATH to the
PATH variable *after* all the config files have been read.  Opinions?
Tom Bertelson           "Any sufficiently advanced technology
RHI Consulting           is indistinguishable from magic."
tbert at abac.com             -- Arthur C. Clarke

More information about the openssh-unix-dev mailing list