[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

openssh-2.3.0p1 vs. GNU autoconf

Summary:  "scp" does not work out of the box on my
Linux system (with glibc 2.1.2).   This may affect
other ports of OpenSSH that use GNU autoconf


Running the GNU ./configure script assumes the installation
path to be /usr/local by default, which means that scp
will go to /usr/local/bin/scp after installation.

This conflicts with _PATH_STDPATH, because it is not
defined to include /usr/local/bin   An extract from
the /usr/include/paths.h file supplied with GNU glibc 2.1.2:

#define	_PATH_STDPATH \

And the thing is, in the absence of the --with-default-path
option to ./configure, this is the path that gets compiled
into the ssh daemon.

So when I do a default installation of Openssh on hosts
A and B, and later try to scp from A to B, the operation
fails with the message that "scp not found".   Further
investigation traced this back to /usr/local/bin
not being part of the default path that is set
at compile time.


1)	A workaround that did the trick for me:

	ln -s /usr/bin/scp /usr/local/bin/scp

2)	Changing the GNU autoconf default "prefix" to be
	/usr instead of /usr/local.   This is probably 
	easy to do, but I don't know GNU autoconf and
	don't have the time to learn it; sorry.

3)	Or, putting a notice in the INSTALL file to
	invoke ./configure with --prefix=/usr/local,
	or to use the --with-default-path option

3)	The following very naive patch _might_ help in some cases, but
	it may create other problems, so I don't particularly suggest
	it very strongly:

diff --unified --recursive openssh-2.3.0p1/defines.h openssh-2.3.0p1-rru/defines.h
--- openssh-2.3.0p1/defines.h	Thu Oct 19 18:14:05 2000
+++ openssh-2.3.0p1-rru/defines.h	Thu Feb 15 13:50:49 2001
@@ -253,7 +253,7 @@
 #ifndef _PATH_STDPATH
-# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
+# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
 #ifndef _PATH_DEVNULL