[PATCH 1/1] Fix SFTP subsystem path
Chris Rapier
rapier at psc.edu
Sat Mar 1 08:06:41 AEDT 2025
In some situation the path to the SFTP subsystem in sshd_config can be
configured incorrectly by the build process.
For example, if you do the following:
./configure
make
./configure --prefix=/opt/ssh
make
sudo make install
The installed sshd_config file will have
Subsystem sftp /usr/libexec/sftp-server
instead of
Subsystem sftp /opt/ssh/libexec/sftp-server
You can avoid this by issuing a make clean after the first make but this
does seem like unexpected behaviour. The following patch resolves this.
diff --git a/Makefile.in b/Makefile.in
index 6762d573a..fac076b60 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -269,7 +269,7 @@ $(MANPAGES): $(MANPAGES_IN)
$(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) > $@; \
fi
-$(CONFIGFILES): $(CONFIGFILES_IN)
+$(CONFIGFILES): $(CONFIGFILES_IN) Makefile
conffile=`echo $@ | sed 's/.out$$//'`; \
$(FIXPATHSCMD) $(srcdir)/$${conffile} > $@
More information about the openssh-unix-dev
mailing list