Share

rssh

Tracker: Patches

5 better search for sftp-server - ID: 2332381
Last Update: Comment added ( wernerflamme )

Hi, I am using x86_64 arch and so configure does not find my sftp-server
binary. Why? Because it searches in /usr/lib/, not in /usr/lib64/.

I createtd a patch to have configure look at the very place where the info
about the locaton of sftp-server is stored - in /etc/ssh/sshd_config.

The patch should work on all systems where grep and awk are found in the
PATH and that have installed the ssh daemon package (since this package
includes sftp-server).

diff -u ./configure.orig ./configure gives following output:

--- ./configure.orig 2006-01-07 03:24:58.000000000 +0100
+++ ./configure 2008-11-23 12:13:03.000000000 +0100
@@ -5046,6 +5046,12 @@
fi
sftp_path=$ac_cv_path_sftp_path

+if test -z "$sftp_path"; then
+ if test -e /etc/ssh/sshd_config; then
+ sftp_path=`grep sftp-server /etc/ssh/sshd_config | awk '{print
$3}'`
+ fi
+fi
+
if test -n "$sftp_path"; then
echo "$as_me:$LINENO: result: $sftp_path" >&5
echo "${ECHO_T}$sftp_path" >&6

Regards,
Werner


Werner Flamme ( wernerflamme ) - 2008-11-23 11:21

5

Open

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2008-11-23 16:46
Sender: wernerflamme

The openSUSE Build System told me that my patch was not enough - sure, it
works for root only :-( So I extended the patch, since scp was not found on
some SUSE variants. The new patch is attached, the old one is deleted.

--- ./configure 2008-11-23 17:17:59.000000000 +0100
+++ ../rssh-orig/configure 2006-01-07 03:24:58.000000000 +0100
@@ -4984,10 +4984,6 @@
fi
scp_path=$ac_cv_path_scp_path

-if test -z "$scp_path"; then
- scp_path=`which scp`
-fi
-
if test -n "$scp_path"; then
echo "$as_me:$LINENO: result: $scp_path" >&5
echo "${ECHO_T}$scp_path" >&6
@@ -5032,10 +5028,6 @@
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR

as_dummy="/usr/libexec:/usr/libexec/openssh:/usr/local/libexec/openssh:/usr/lib/openssh:/usr/lib:/usr/local/libexec:/usr/lib/ssh"
-as_arch_helper=`uname -m`
-if test "a$as_arch_helper" = "ax86_64"; then
- as_dummy="$as_dummy:/usr/lib64/openssh:/usr/lib64:/usr/lib64/ssh"
-fi
for as_dir in $as_dummy
do
IFS=$as_save_IFS
@@ -5054,12 +5046,6 @@
fi
sftp_path=$ac_cv_path_sftp_path

-if test -z "$sftp_path"; then
- if test -r /etc/ssh/sshd_config; then
- sftp_path=`grep sftp-server /etc/ssh/sshd_config | awk '{print
$3}'`
- fi
-fi
-
if test -n "$sftp_path"; then
echo "$as_me:$LINENO: result: $sftp_path" >&5
echo "${ECHO_T}$sftp_path" >&6

File Added: configure.patch


Log in to comment.

Attached File ( 1 )

Filename Description Download
configure.patch extended Patch Download

Changes ( 3 )

Field Old Value Date By
File Added 302615: configure.patch 2008-11-23 16:46 wernerflamme
File Deleted 302576: 2008-11-23 16:46 wernerflamme
File Added 302576: configure.patch 2008-11-23 11:21 wernerflamme