[scponly] Patch for configure.in regarding hardcoded sftp-server path
Thomas Wana
thomas at wana.at
Fri Jul 10 08:51:02 EDT 2009
Hi,
you can tell configure to not look for the sftp-server binary
if you supply a hardcoded path on the command line, e.g.
./configure --with-sftp-server=/usr/lib/sftp-server
However, if you also supply --enable-scp-compat, configure still
tries to find the sftp-server binary, and then fails. The
following patch fixes the problem.
Tom
Index: configure.in
===================================================================
--- configure.in (revision 30)
+++ configure.in (revision 31)
@@ -231,7 +231,21 @@
if test "x$scponly_scp_compat" != "x"; then
AC_MSG_NOTICE([enabling core WinSCP and Vanilla SCP binaries...])
- SCPONLY_PATH_PROG_DEFINE([PROG_SFTP_SERVER],
[sftp-server],[/usr/lib:/usr/lib64:/usr/libexec:/usr/libexec/openssh:/usr/lib/ssh:/usr/lib64/ssh:/usr/local/libexec:/usr/lib/misc:/usr/lib/openssh])
+ if test "x$scponly_explicit_sftpserver_path" = "x"; then
+ dnl Informed guess:
+ SCPONLY_PATH_PROG_DEFINE([PROG_SFTP_SERVER], [sftp-server],
+
[/usr/lib:/usr/lib64:/usr/libexec:/usr/libexec/openssh:/usr/lib/ssh:/usr/lib64/ssh:/usr/local/libexec:/usr/lib/misc:/usr/lib/openssh])
+ dnl Debian uses /usr/lib
+ dnl Red Hat uses /usr/libexec/openssh
+ dnl Many a *BSD uses $PATH itself (which is implicit +
checked 1st)
+ dnl Lupe says FreeBSD wants /usr/[local]/libexec
+ dnl I've seen it in /usr/lib/ssh under Mandrake 8.1
+ else
+ dnl Do what SCPONLY_PATH_PROG_DEFINE does:
+ echo checking for sftp-server...
$scponly_explicit_sftpserver_path
+ AC_DEFINE_UNQUOTED([PROG_SFTP_SERVER],
["$scponly_explicit_sftpserver_path"])
+ scponly_PROG_SFTP_SERVER=$scponly_explicit_sftpserver_path
+ fi
SCPONLY_PATH_PROG_DEFINE([PROG_LS], [ls],
[/bin:/usr/bin:/sbin:/usr/sbin])
SCPONLY_PATH_PROG_DEFINE([PROG_SCP], [scp],
[/bin:/usr/bin:/sbin:/usr/sbin])
SCPONLY_PATH_PROG_DEFINE([PROG_RM], [rm],
[/bin:/usr/bin:/sbin:/usr/sbin])
More information about the scponly
mailing list