program-prefix does not work

Bryan Chua chua at ayrnetworks.com
Wed Oct 17 08:54:08 EST 2001


the configure option --program-prefix does not work although it is 
listed in teh configure --help output.

The attached patch fixes these issues:
1) program prefix is not substituted in configure
2) program prefix is not present in Makefile
3) scp requires use of a known "scp" program

-- bryan

diff -cr openssh-2.9.9p2.orig/Makefile.in openssh-2.9.9p2/Makefile.in
*** openssh-2.9.9p2.orig/Makefile.in	Mon Sep 17 22:06:22 2001
--- openssh-2.9.9p2/Makefile.in	Tue Oct 16 15:29:27 2001
***************
*** 12,29 ****
   piddir=@piddir@
   srcdir=@srcdir@
   top_srcdir=@top_srcdir@

   DESTDIR=
   VPATH=@srcdir@
! SSH_PROGRAM=@bindir@/ssh
! ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
! SFTP_SERVER=$(libexecdir)/sftp-server

   PATHS= -DETCDIR=\"$(sysconfdir)\" \
   	-D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
   	-D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \
   	-D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \
! 	-D_PATH_SSH_PIDDIR=\"$(piddir)\"

   CC=@CC@
   LD=@LD@
--- 12,31 ----
   piddir=@piddir@
   srcdir=@srcdir@
   top_srcdir=@top_srcdir@
+ program_prefix=@program_prefix@

   DESTDIR=
   VPATH=@srcdir@
! SSH_PROGRAM=@bindir@/$(program_prefix)ssh
! ASKPASS_PROGRAM=$(libexecdir)/$(program_prefix)ssh-askpass
! SFTP_SERVER=$(libexecdir)/$(program_prefix)sftp-server

   PATHS= -DETCDIR=\"$(sysconfdir)\" \
   	-D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
   	-D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \
   	-D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \
! 	-D_PATH_SSH_PIDDIR=\"$(piddir)\" \
! 	-D_PROGRAM_PREFIX=\"$(program_prefix)\"

   CC=@CC@
   LD=@LD@
***************
*** 60,77 ****
   CONFIGFILES_IN=sshd_config ssh_config moduli

   PATHSUBS	= \
! 	-D/etc/ssh_config=$(sysconfdir)/ssh_config \
! 	-D/etc/ssh_known_hosts=$(sysconfdir)/ssh_known_hosts \
! 	-D/etc/sshd_config=$(sysconfdir)/sshd_config \
   	-D/usr/libexec=$(libexecdir) \
! 	-D/etc/shosts.equiv=$(sysconfdir)/shosts.equiv \
! 	-D/etc/ssh_host_key=$(sysconfdir)/ssh_host_key \
! 	-D/etc/ssh_host_dsa_key=$(sysconfdir)/ssh_host_dsa_key \
! 	-D/etc/ssh_host_rsa_key=$(sysconfdir)/ssh_host_rsa_key \
! 	-D/var/run/sshd.pid=$(piddir)/sshd.pid \
   	-D/etc/moduli=$(sysconfdir)/moduli \
! 	-D/etc/sshrc=$(sysconfdir)/sshrc \
   	-D/usr/X11R6/bin/xauth=$(XAUTH_PATH) \
   	-D/usr/bin:/bin:/usr/sbin:/sbin=@user_path@

   FIXPATHSCMD	= $(PERL) $(srcdir)/fixpaths $(PATHSUBS)
--- 62,86 ----
   CONFIGFILES_IN=sshd_config ssh_config moduli

   PATHSUBS	= \
! 	-D/etc/ssh_config=$(sysconfdir)/$(program_prefix)ssh_config \
! 	-D/etc/ssh_known_hosts=$(sysconfdir)/$(program_prefix)ssh_known_hosts \
! 	-D/etc/sshd_config=$(sysconfdir)/$(program_prefix)sshd_config \
   	-D/usr/libexec=$(libexecdir) \
! 	-D/etc/shosts.equiv=$(sysconfdir)/$(program_prefix)shosts.equiv \
! 	-D/etc/ssh_host_key=$(sysconfdir)/$(program_prefix)ssh_host_key \
! 	-D/etc/ssh_host_dsa_key=$(sysconfdir)/$(program_prefix)ssh_host_dsa_key \
! 	-D/etc/ssh_host_rsa_key=$(sysconfdir)/$(program_prefix)ssh_host_rsa_key \
! 	-D/var/run/sshd.pid=$(piddir)/$(program_prefix)sshd.pid \
   	-D/etc/moduli=$(sysconfdir)/moduli \
! 	-D/etc/sshrc=$(sysconfdir)/$(program_prefix)sshrc \
   	-D/usr/X11R6/bin/xauth=$(XAUTH_PATH) \
+ 	-D/sftp=/$(program_prefix)sftp \
+ 	-D" sftp= $(program_prefix)sftp"\
+ 	-D/ssh=/$(program_prefix)ssh \
+ 	-D/.ssh=/.$(program_prefix)ssh \
+ 	-D" ssh= $(program_prefix)ssh" \
+ 	-D/scp=/$(program_prefix)scp \
+ 	-D" scp= $(program_prefix)scp" \
   	-D/usr/bin:/bin:/usr/sbin:/sbin=@user_path@

   FIXPATHSCMD	= $(PERL) $(srcdir)/fixpaths $(PATHSUBS)
***************
*** 187,234 ****
   	$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1
   	$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8
   	$(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
! 	$(INSTALL) -m $(SSH_MODE) -s ssh $(DESTDIR)$(bindir)/ssh
! 	$(INSTALL) -m 0755 -s scp $(DESTDIR)$(bindir)/scp
! 	$(INSTALL) -m 0755 -s ssh-add $(DESTDIR)$(bindir)/ssh-add
! 	$(INSTALL) -m 0755 -s ssh-agent $(DESTDIR)$(bindir)/ssh-agent
! 	$(INSTALL) -m 0755 -s ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen
! 	$(INSTALL) -m 0755 -s ssh-keyscan $(DESTDIR)$(bindir)/ssh-keyscan
! 	$(INSTALL) -m 0755 -s sshd $(DESTDIR)$(sbindir)/sshd
! 	@NO_SFTP@$(INSTALL) -m 0755 -s sftp $(DESTDIR)$(bindir)/sftp
   	@NO_SFTP@$(INSTALL) -m 0755 -s sftp-server $(DESTDIR)$(SFTP_SERVER)
! 	$(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
! 	$(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
! 	$(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
! 	$(INSTALL) -m 644 ssh-agent.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
! 	$(INSTALL) -m 644 ssh-keygen.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
! 	$(INSTALL) -m 644 ssh-keyscan.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
! 	$(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
! 	@NO_SFTP@$(INSTALL) -m 644 sftp.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
! 	@NO_SFTP@$(INSTALL) -m 644 sftp-server.8.out 
$(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
! 	-rm -f $(DESTDIR)$(bindir)/slogin
! 	ln -s ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
! 	ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
   	#@FILEPRIV@ -f dev,filesys,driver $(DESTDIR)$(bindir)/ssh 
$(DESTDIR)$(bindir)/slogin
   	if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
   		$(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \
   	fi
! 	if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \
! 		$(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
   	else \
! 		echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will 
not overwrite"; \
   	fi
! 	if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
! 		$(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \
   	else \
! 		echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will 
not overwrite"; \
   	fi
   	if [ -f ssh_prng_cmds -a ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
   		$(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
! 		if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \
! 	 
	$(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \
   		else \
! 	 
	echo "$(DESTDIR)$(sysconfdir)/ssh_prng_cmds already exists, install will 
not overwrite"; \
   		fi ; \
   	fi
   	if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
--- 196,243 ----
   	$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1
   	$(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8
   	$(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
! 	$(INSTALL) -m $(SSH_MODE) -s ssh $(DESTDIR)$(bindir)/$(program_prefix)ssh
! 	$(INSTALL) -m 0755 -s scp $(DESTDIR)$(bindir)/$(program_prefix)scp
! 	$(INSTALL) -m 0755 -s ssh-add $(DESTDIR)$(bindir)/$(program_prefix)ssh-add
! 	$(INSTALL) -m 0755 -s ssh-agent 
$(DESTDIR)$(bindir)/$(program_prefix)ssh-agent
! 	$(INSTALL) -m 0755 -s ssh-keygen 
$(DESTDIR)$(bindir)/$(program_prefix)ssh-keygen
! 	$(INSTALL) -m 0755 -s ssh-keyscan 
$(DESTDIR)$(bindir)/$(program_prefix)ssh-keyscan
! 	$(INSTALL) -m 0755 -s sshd $(DESTDIR)$(sbindir)/$(program_prefix)sshd
! 	@NO_SFTP@$(INSTALL) -m 0755 -s sftp 
$(DESTDIR)$(bindir)/$(program_prefix)sftp
   	@NO_SFTP@$(INSTALL) -m 0755 -s sftp-server $(DESTDIR)$(SFTP_SERVER)
! 	$(INSTALL) -m 644 ssh.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh.1
! 	$(INSTALL) -m 644 scp.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)scp.1
! 	$(INSTALL) -m 644 ssh-add.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh-add.1
! 	$(INSTALL) -m 644 ssh-agent.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh-agent.1
! 	$(INSTALL) -m 644 ssh-keygen.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh-keygen.1
! 	$(INSTALL) -m 644 ssh-keyscan.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh-keyscan.1
! 	$(INSTALL) -m 644 sshd.8.out 
$(DESTDIR)$(mandir)/$(mansubdir)8/$(program_prefix)sshd.8
! 	@NO_SFTP@$(INSTALL) -m 644 sftp.1.out 
$(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)sftp.1
! 	@NO_SFTP@$(INSTALL) -m 644 sftp-server.8.out 
$(DESTDIR)$(mandir)/$(mansubdir)8/$(program_prefix)sftp-server.8
! 	-rm -f $(DESTDIR)$(bindir)/slogin 
$(DESTDIR)$(bindir)/$(program_prefix)slogin
! 	ln -s $(program_prefix)ssh$(EXEEXT) 
$(DESTDIR)$(bindir)/$(program_prefix)slogin
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)slogin.1 
$(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)slogin.1
! 	ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)slogin.1
   	#@FILEPRIV@ -f dev,filesys,driver $(DESTDIR)$(bindir)/ssh 
$(DESTDIR)$(bindir)/slogin
   	if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
   		$(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \
   	fi
! 	if [ ! -f $(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_config ]; then \
! 		$(INSTALL) -m 644 ssh_config.out 
$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_config; \
   	else \
! 		echo "$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_config already 
exists, install will not overwrite"; \
   	fi
! 	if [ ! -f $(DESTDIR)$(sysconfdir)/$(program_prefix)sshd_config ]; then \
! 		$(INSTALL) -m 644 sshd_config.out 
$(DESTDIR)$(sysconfdir)/$(program_prefix)sshd_config; \
   	else \
! 		echo "$(DESTDIR)$(sysconfdir)/$(program_prefix)sshd_config already 
exists, install will not overwrite"; \
   	fi
   	if [ -f ssh_prng_cmds -a ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
   		$(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
! 		if [ ! -f $(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_prng_cmds ] ; then \
! 	 
	$(INSTALL) -m 644 ssh_prng_cmds.out 
$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_prng_cmds; \
   		else \
! 	 
	echo "$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_prng_cmds already 
exists, install will not overwrite"; \
   		fi ; \
   	fi
   	if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
***************
*** 244,275 ****

   host-key: ssh-keygen$(EXEEXT)
   	if [ -z "$(DESTDIR)" ] ; then \
! 		if [ -f "$(DESTDIR)$(sysconfdir)/ssh_host_key" ] ; then \
! 	 
	echo "$(DESTDIR)$(sysconfdir)/ssh_host_key already exists, skipping." ; \
   		else \
! 	 
	./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" ; \
   		fi ; \
! 		if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key ] ; then \
! 	 
	echo "$(DESTDIR)$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \
   		else \
! 	 
	./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" ; \
   		fi ; \
! 		if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key ] ; then \
! 	 
	echo "$(DESTDIR)$(sysconfdir)/ssh_host_rsa_key already exists, skipping." ; \
   		else \
! 	 
	./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N "" ; \
   		fi ; \
   	fi ;

   host-key-force: ssh-keygen$(EXEEXT)
! 	./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N ""
! 	./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N ""
! 	./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N ""

   uninstallall:	uninstall
! 	-rm -f $(DESTDIR)$(sysconfdir)/ssh_config
! 	-rm -f $(DESTDIR)$(sysconfdir)/sshd_config
! 	-rm -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds
   	-rmdir $(DESTDIR)$(sysconfdir)
   	-rmdir $(DESTDIR)$(bindir)
   	-rmdir $(DESTDIR)$(sbindir)
--- 253,284 ----

   host-key: ssh-keygen$(EXEEXT)
   	if [ -z "$(DESTDIR)" ] ; then \
! 		if [ -f "$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_key" ] ; then \
! 	 
	echo "$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_key already 
exists, skipping." ; \
   		else \
! 	 
	./ssh-keygen -t rsa1 -f 
$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_key -N "" ; \
   		fi ; \
! 		if [ -f $(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_dsa_key ] ; then \
! 	 
	echo "$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_dsa_key already 
exists, skipping." ; \
   		else \
! 	 
	./ssh-keygen -t dsa -f 
$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_dsa_key -N "" ; \
   		fi ; \
! 		if [ -f $(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_rsa_key ] ; then \
! 	 
	echo "$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_rsa_key already 
exists, skipping." ; \
   		else \
! 	 
	./ssh-keygen -t rsa -f 
$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_rsa_key -N "" ; \
   		fi ; \
   	fi ;

   host-key-force: ssh-keygen$(EXEEXT)
! 	./ssh-keygen -t rsa1 -f 
$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_key -N ""
! 	./ssh-keygen -t dsa -f 
$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_dsa_key -N ""
! 	./ssh-keygen -t rsa -f 
$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_rsa_key -N ""

   uninstallall:	uninstall
! 	-rm -f $(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_config
! 	-rm -f $(DESTDIR)$(sysconfdir)/$(program_prefix)sshd_config
! 	-rm -f $(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_prng_cmds
   	-rmdir $(DESTDIR)$(sysconfdir)
   	-rmdir $(DESTDIR)$(bindir)
   	-rmdir $(DESTDIR)$(sbindir)
***************
*** 279,301 ****
   	-rmdir $(DESTDIR)$(libexecdir)

   uninstall:
! 	-rm -f $(DESTDIR)$(bindir)/slogin
! 	-rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT)
! 	-rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
   	-rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
--- 288,310 ----
   	-rmdir $(DESTDIR)$(libexecdir)

   uninstall:
! 	-rm -f $(DESTDIR)$(bindir)/$(program_prefix)slogin
! 	-rm -f $(DESTDIR)$(bindir)/$(program_prefix)ssh$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/$(program_prefix)scp$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/$(program_prefix)ssh-add$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/$(program_prefix)ssh-agent$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/$(program_prefix)ssh-keygen$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/$(program_prefix)ssh-keyscan$(EXEEXT)
! 	-rm -f $(DESTDIR)$(bindir)/$(program_prefix)sftp$(EXEEXT)
! 	-rm -f $(DESTDIR)$(sbindir)/$(program_prefix)sshd$(EXEEXT)
   	-rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)scp.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh-add.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh-agent.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh-keygen.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)sftp.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)ssh-keyscan.1
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/$(program_prefix)sshd.8
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/$(program_prefix)sftp-server.8
! 	-rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/$(program_prefix)slogin.1
diff -cr openssh-2.9.9p2.orig/configure openssh-2.9.9p2/configure
*** openssh-2.9.9p2.orig/configure	Tue Sep 25 15:50:31 2001
--- openssh-2.9.9p2/configure	Tue Oct 16 15:44:21 2001
***************
*** 218,224 ****
     --cache-file=FILE       cache test results in FILE
     --help                  print this message
     --no-create             do not create output files
!   --quiet, --silent       do not print \`checking...' messages
     --version               print the version of autoconf that created 
configure
   Directory and file names:
     --prefix=PREFIX         install architecture-independent files in 
PREFIX
--- 218,224 ----
     --cache-file=FILE       cache test results in FILE
     --help                  print this message
     --no-create             do not create output files
!   --quiet, --silent       do not print \`checking...\' messages
     --version               print the version of autoconf that created 
configure
   Directory and file names:
     --prefix=PREFIX         install architecture-independent files in 
PREFIX
***************
*** 9339,9344 ****
--- 9339,9345 ----
   s%@LIBS@%$LIBS%g
   s%@exec_prefix@%$exec_prefix%g
   s%@prefix@%$prefix%g
+ s%@program_prefix@%$program_prefix%g
   s%@program_transform_name@%$program_transform_name%g
   s%@bindir@%$bindir%g
   s%@sbindir@%$sbindir%g
diff -cr openssh-2.9.9p2.orig/pathnames.h openssh-2.9.9p2/pathnames.h
*** openssh-2.9.9p2.orig/pathnames.h	Wed Jun 27 17:13:48 2001
--- openssh-2.9.9p2/pathnames.h	Tue Oct 16 13:30:09 2001
***************
*** 20,42 ****
   #define _PATH_SSH_PIDDIR		"/var/run"
   #endif

   /*
    * System-wide file containing host keys of known hosts.  This file 
should be
    * world-readable.
    */
! #define _PATH_SSH_SYSTEM_HOSTFILE	ETCDIR "/ssh_known_hosts"
   /* backward compat for protocol 2 */
! #define _PATH_SSH_SYSTEM_HOSTFILE2	ETCDIR "/ssh_known_hosts2"

   /*
    * Of these, ssh_host_key must be readable only by root, whereas 
ssh_config
    * should be world-readable.
    */
! #define _PATH_SERVER_CONFIG_FILE	ETCDIR "/sshd_config"
! #define _PATH_HOST_CONFIG_FILE		ETCDIR "/ssh_config"
! #define _PATH_HOST_KEY_FILE		ETCDIR "/ssh_host_key"
! #define _PATH_HOST_DSA_KEY_FILE		ETCDIR "/ssh_host_dsa_key"
! #define _PATH_HOST_RSA_KEY_FILE		ETCDIR "/ssh_host_rsa_key"
   #define _PATH_DH_MODULI			ETCDIR "/moduli"
   /* Backwards compatibility */
   #define _PATH_DH_PRIMES			ETCDIR "/primes"
--- 20,45 ----
   #define _PATH_SSH_PIDDIR		"/var/run"
   #endif

+ #ifndef _PROGRAM_PREFIX
+ #define _PROGRAM_PREFIX			""
+ #endif
   /*
    * System-wide file containing host keys of known hosts.  This file 
should be
    * world-readable.
    */
! #define _PATH_SSH_SYSTEM_HOSTFILE	ETCDIR "/" _PROGRAM_PREFIX "ssh_known_hosts"
   /* backward compat for protocol 2 */
! #define _PATH_SSH_SYSTEM_HOSTFILE2	ETCDIR "/" _PROGRAM_PREFIX "ssh_known_hosts2"

   /*
    * Of these, ssh_host_key must be readable only by root, whereas 
ssh_config
    * should be world-readable.
    */
! #define _PATH_SERVER_CONFIG_FILE	ETCDIR "/" _PROGRAM_PREFIX "sshd_config"
! #define _PATH_HOST_CONFIG_FILE		ETCDIR "/" _PROGRAM_PREFIX "ssh_config"
! #define _PATH_HOST_KEY_FILE		ETCDIR "/" _PROGRAM_PREFIX "ssh_host_key"
! #define _PATH_HOST_DSA_KEY_FILE		ETCDIR "/" _PROGRAM_PREFIX "ssh_host_dsa_key"
! #define _PATH_HOST_RSA_KEY_FILE		ETCDIR "/" _PROGRAM_PREFIX "ssh_host_rsa_key"
   #define _PATH_DH_MODULI			ETCDIR "/moduli"
   /* Backwards compatibility */
   #define _PATH_DH_PRIMES			ETCDIR "/primes"
***************
*** 45,78 ****
   #define _PATH_SSH_PROGRAM		"/usr/bin/ssh"
   #endif

   /*
    * The process id of the daemon listening for connections is saved 
here to
    * make it easier to kill the correct daemon when necessary.
    */
! #define _PATH_SSH_DAEMON_PID_FILE	_PATH_SSH_PIDDIR "/sshd.pid"

   /*
    * The directory in user\'s home directory in which the files reside. The
    * directory should be world-readable (though not all files are).
    */
! #define _PATH_SSH_USER_DIR		".ssh"

   /*
    * Per-user file containing host keys of known hosts.  This file need 
not be
    * readable by anyone except the user him/herself, though this does not
    * contain anything particularly secret.
    */
! #define _PATH_SSH_USER_HOSTFILE		"~/.ssh/known_hosts"
   /* backward compat for protocol 2 */
! #define _PATH_SSH_USER_HOSTFILE2	"~/.ssh/known_hosts2"

   /*
    * Name of the default file containing client-side authentication 
key. This
    * file should only be readable by the user him/herself.
    */
! #define _PATH_SSH_CLIENT_IDENTITY	".ssh/identity"
! #define _PATH_SSH_CLIENT_ID_DSA		".ssh/id_dsa"
! #define _PATH_SSH_CLIENT_ID_RSA		".ssh/id_rsa"

   /*
    * Configuration file in user\'s home directory.  This file need not be
--- 48,85 ----
   #define _PATH_SSH_PROGRAM		"/usr/bin/ssh"
   #endif

+ #ifndef _PATH_SCP_PROGRAM
+ #define _PATH_SCP_PROGRAM		_PROGRAM_PREFIX "scp"
+ #endif
+
   /*
    * The process id of the daemon listening for connections is saved 
here to
    * make it easier to kill the correct daemon when necessary.
    */
! #define _PATH_SSH_DAEMON_PID_FILE	_PATH_SSH_PIDDIR "/" _PROGRAM_PREFIX "sshd.pid"

   /*
    * The directory in user\'s home directory in which the files reside. The
    * directory should be world-readable (though not all files are).
    */
! #define _PATH_SSH_USER_DIR		"." _PROGRAM_PREFIX "ssh"

   /*
    * Per-user file containing host keys of known hosts.  This file need 
not be
    * readable by anyone except the user him/herself, though this does not
    * contain anything particularly secret.
    */
! #define _PATH_SSH_USER_HOSTFILE		"~/" _PATH_SSH_USER_DIR "/known_hosts"
   /* backward compat for protocol 2 */
! #define _PATH_SSH_USER_HOSTFILE2	"~/" _PATH_SSH_USER_DIR "/known_hosts2"

   /*
    * Name of the default file containing client-side authentication 
key. This
    * file should only be readable by the user him/herself.
    */
! #define _PATH_SSH_CLIENT_IDENTITY	_PATH_SSH_USER_DIR "/identity"
! #define _PATH_SSH_CLIENT_ID_DSA		_PATH_SSH_USER_DIR "/id_dsa"
! #define _PATH_SSH_CLIENT_ID_RSA		_PATH_SSH_USER_DIR "/id_rsa"

   /*
    * Configuration file in user\'s home directory.  This file need not be
***************
*** 80,86 ****
    * particularly secret.  If the user\'s home directory resides on an NFS
    * volume where root is mapped to nobody, this may need to be 
world-readable.
    */
! #define _PATH_SSH_USER_CONFFILE		".ssh/config"

   /*
    * File containing a list of those rsa keys that permit logging in as 
this
--- 87,93 ----
    * particularly secret.  If the user\'s home directory resides on an NFS
    * volume where root is mapped to nobody, this may need to be 
world-readable.
    */
! #define _PATH_SSH_USER_CONFFILE		_PATH_SSH_USER_DIR "/config"

   /*
    * File containing a list of those rsa keys that permit logging in as 
this
***************
*** 90,99 ****
    * may need to be world-readable.  (This file is read by the daemon 
which is
    * running as root.)
    */
! #define _PATH_SSH_USER_PERMITTED_KEYS	".ssh/authorized_keys"

   /* backward compat for protocol v2 */
! #define _PATH_SSH_USER_PERMITTED_KEYS2	".ssh/authorized_keys2"

   /*
    * Per-user and system-wide ssh "rc" files.  These files are executed 
with
--- 97,106 ----
    * may need to be world-readable.  (This file is read by the daemon 
which is
    * running as root.)
    */
! #define _PATH_SSH_USER_PERMITTED_KEYS	_PATH_SSH_USER_DIR "/authorized_keys"

   /* backward compat for protocol v2 */
! #define _PATH_SSH_USER_PERMITTED_KEYS2	_PATH_SSH_USER_DIR "/authorized_keys2"

   /*
    * Per-user and system-wide ssh "rc" files.  These files are executed 
with
***************
*** 101,108 ****
    * passed "proto cookie" as arguments if X11 forwarding with spoofing 
is in
    * use.  xauth will be run if neither of these exists.
    */
! #define _PATH_SSH_USER_RC		".ssh/rc"
! #define _PATH_SSH_SYSTEM_RC		ETCDIR "/sshrc"

   /*
    * Ssh-only version of /etc/hosts.equiv.  Additionally, the daemon 
may use
--- 108,115 ----
    * passed "proto cookie" as arguments if X11 forwarding with spoofing 
is in
    * use.  xauth will be run if neither of these exists.
    */
! #define _PATH_SSH_USER_RC		_PATH_SSH_USER_DIR "/rc"
! #define _PATH_SSH_SYSTEM_RC		ETCDIR "/" _PROGRAM_PREFIX "sshrc"

   /*
    * Ssh-only version of /etc/hosts.equiv.  Additionally, the daemon 
may use
***************
*** 115,121 ****
    * Default location of askpass
    */
   #ifndef _PATH_SSH_ASKPASS_DEFAULT
! #define _PATH_SSH_ASKPASS_DEFAULT	"/usr/X11R6/bin/ssh-askpass"
   #endif

   /* xauth for X11 forwarding */
--- 122,128 ----
    * Default location of askpass
    */
   #ifndef _PATH_SSH_ASKPASS_DEFAULT
! #define _PATH_SSH_ASKPASS_DEFAULT	"/usr/X11R6/bin/" _PROGRAM_PREFIX "ssh-askpass"
   #endif

   /* xauth for X11 forwarding */
***************
*** 130,136 ****

   /* for sftp */
   #ifndef _PATH_SFTP_SERVER
! #define _PATH_SFTP_SERVER		"/usr/libexec/sftp-server"
   #endif
   #ifndef _PATH_LS
   #define _PATH_LS			"ls"
--- 137,143 ----

   /* for sftp */
   #ifndef _PATH_SFTP_SERVER
! #define _PATH_SFTP_SERVER		"/usr/libexec/" _PROGRAM_PREFIX "sftp-server"
   #endif
   #ifndef _PATH_LS
   #define _PATH_LS			"ls"
***************
*** 147,161 ****

   /* Askpass program define */
   #ifndef ASKPASS_PROGRAM
! #define ASKPASS_PROGRAM         "/usr/lib/ssh/ssh-askpass"
   #endif /* ASKPASS_PROGRAM */

   /*
    * Relevant only when using builtin PRNG.
    */
   #ifndef SSH_PRNG_SEED_FILE
! # define SSH_PRNG_SEED_FILE      _PATH_SSH_USER_DIR"/prng_seed"
   #endif /* SSH_PRNG_SEED_FILE */
   #ifndef SSH_PRNG_COMMAND_FILE
! # define SSH_PRNG_COMMAND_FILE   ETCDIR "/ssh_prng_cmds"
   #endif /* SSH_PRNG_COMMAND_FILE */
--- 154,168 ----

   /* Askpass program define */
   #ifndef ASKPASS_PROGRAM
! #define ASKPASS_PROGRAM         "/usr/lib/ssh" "/" _PROGRAM_PREFIX 
"ssh-askpass"
   #endif /* ASKPASS_PROGRAM */

   /*
    * Relevant only when using builtin PRNG.
    */
   #ifndef SSH_PRNG_SEED_FILE
! # define SSH_PRNG_SEED_FILE      _PATH_SSH_USER_DIR "/" 
_PROGRAM_PREFIX "prng_seed"
   #endif /* SSH_PRNG_SEED_FILE */
   #ifndef SSH_PRNG_COMMAND_FILE
! # define SSH_PRNG_COMMAND_FILE   ETCDIR "/" _PROGRAM_PREFIX 
"ssh_prng_cmds"
   #endif /* SSH_PRNG_COMMAND_FILE */
Only in openssh-2.9.9p2.orig/scard: Ssh.bin
diff -cr openssh-2.9.9p2.orig/scp.c openssh-2.9.9p2/scp.c
*** openssh-2.9.9p2.orig/scp.c	Wed Sep 19 17:57:56 2001
--- openssh-2.9.9p2/scp.c	Tue Oct 16 14:14:46 2001
***************
*** 132,137 ****
--- 132,138 ----

   /* This is the program to execute for the secured connection. ("ssh" 
or -S) */
   char *ssh_program = _PATH_SSH_PROGRAM;
+ char *scp_program = _PATH_SCP_PROGRAM;

   /*
    * This function executes the given command as the specified user on the
***************
*** 242,248 ****
   	addargs(&args, "-oClearAllForwardings yes");

   	fflag = tflag = 0;
! 	while ((ch = getopt(argc, argv, "dfprtvBCc:i:P:q46S:o:F:")) != -1)
   		switch (ch) {
   		/* User-visible flags. */
   		case '4':
--- 243,249 ----
   	addargs(&args, "-oClearAllForwardings yes");

   	fflag = tflag = 0;
! 	while ((ch = getopt(argc, argv, "dfprtvBCc:i:P:q46Ss:o:F:")) != -1)
   		switch (ch) {
   		/* User-visible flags. */
   		case '4':
***************
*** 271,276 ****
--- 272,280 ----
   		case 'S':
   			ssh_program = xstrdup(optarg);
   			break;
+ 		case 's':
+ 	 
	scp_program = xstrdup(optarg);
+ 	 
	break;
   		case 'v':
   			addargs(&args, "-v");
   			verbose_mode = 1;
***************
*** 327,343 ****

   	remin = remout = -1;
   	/* Command to be executed on remote system using "ssh". */
! 	(void) snprintf(cmd, sizeof cmd, "scp%s%s%s%s",
   	    verbose_mode ? " -v" : "",
   	    iamrecursive ? " -r" : "", pflag ? " -p" : "",
! 	    targetshouldbedirectory ? " -d" : "");

   	(void) signal(SIGPIPE, lostconn);

   	if ((targ = colon(argv[argc - 1])))	/* Dest is remote host. */
! 		toremote(targ, argc, argv);
   	else {
! 		tolocal(argc, argv);	/* Dest is local host. */
   		if (targetshouldbedirectory)
   			verifydir(argv[argc - 1]);
   	}
--- 331,349 ----

   	remin = remout = -1;
   	/* Command to be executed on remote system using "ssh". */
! 	if (snprintf(cmd, sizeof cmd, "%s%s%s%s%s",
! 		scp_program,
   	    verbose_mode ? " -v" : "",
   	    iamrecursive ? " -r" : "", pflag ? " -p" : "",
! 	    targetshouldbedirectory ? " -d" : "") < 0)
! 	    fprintf (stderr, "command truncated: %s\n", cmd);

   	(void) signal(SIGPIPE, lostconn);

   	if ((targ = colon(argv[argc - 1])))	/* Dest is remote host. */
! 	    toremote(targ, argc, argv);
   	else {
! 	    tolocal(argc, argv);	/* Dest is local host. */
   		if (targetshouldbedirectory)
   			verifydir(argv[argc - 1]);
   	}
***************
*** 392,413 ****
   		 
		suser = pwd->pw_name;
   		 
	else if (!okname(suser))
   		 
		continue;
! 	 
		snprintf(bp, len,
   		 
	    "%s%s %s -n "
   		 
	    "-l %s %s %s %s '%s%s%s:%s'",
   		 
	    ssh_program, verbose_mode ? " -v" : "",
   		 
	    ssh_options, suser, host, cmd, src,
   		 
	    tuser ? tuser : "", tuser ? "@" : "",
! 	 
		    thost, targ);
   			} else {
   		 
	host = cleanhostname(argv[i]);
! 	 
		snprintf(bp, len,
   		 
	    "exec %s%s %s -n %s "
   		 
	    "%s %s '%s%s%s:%s'",
   		 
	    ssh_program, verbose_mode ? " -v" : "",
   		 
	    ssh_options, host, cmd, src,
   		 
	    tuser ? tuser : "", tuser ? "@" : "",
! 	 
		    thost, targ);
   			}
   			if (verbose_mode)
   		 
	fprintf(stderr, "Executing: %s\n", bp);
--- 398,421 ----
   		 
		suser = pwd->pw_name;
   		 
	else if (!okname(suser))
   		 
		continue;
! 	 
		if (snprintf(bp, len,
   		 
	    "%s%s %s -n "
   		 
	    "-l %s %s %s %s '%s%s%s:%s'",
   		 
	    ssh_program, verbose_mode ? " -v" : "",
   		 
	    ssh_options, suser, host, cmd, src,
   		 
	    tuser ? tuser : "", tuser ? "@" : "",
! 	 
			thost, targ) < 0)
! 	 
		    fprintf(stderr, "command truncated: %s\n", bp);
   			} else {
   		 
	host = cleanhostname(argv[i]);
! 	 
		if (snprintf(bp, len,
   		 
	    "exec %s%s %s -n %s "
   		 
	    "%s %s '%s%s%s:%s'",
   		 
	    ssh_program, verbose_mode ? " -v" : "",
   		 
	    ssh_options, host, cmd, src,
   		 
	    tuser ? tuser : "", tuser ? "@" : "",
! 	 
			thost, targ) < 0)
! 	 
		    fprintf(stderr, "command truncated: %s\n", bp);
   			}
   			if (verbose_mode)
   		 
	fprintf(stderr, "Executing: %s\n", bp);
***************
*** 417,423 ****
   			if (remin == -1) {
   		 
	len = strlen(targ) + CMDNEEDS + 20;
   		 
	bp = xmalloc(len);
! 	 
		(void) snprintf(bp, len, "%s -t %s", cmd, targ);
   		 
	host = cleanhostname(thost);
   		 
	if (do_cmd(host, tuser, bp, &remin,
   		 
	    &remout, argc) < 0)
--- 425,432 ----
   			if (remin == -1) {
   		 
	len = strlen(targ) + CMDNEEDS + 20;
   		 
	bp = xmalloc(len);
! 	 
		if (snprintf(bp, len, "%s -t %s", cmd, targ) < 0)
! 	 
		    fprintf(stderr, "command truncated: %s\n", bp);
   		 
	host = cleanhostname(thost);
   		 
	if (do_cmd(host, tuser, bp, &remin,
   		 
	    &remout, argc) < 0)
***************
*** 444,452 ****
   			len = strlen(_PATH_CP) + strlen(argv[i]) +
   			    strlen(argv[argc - 1]) + 20;
   			bp = xmalloc(len);
! 	 
	(void) snprintf(bp, len, "exec %s%s%s %s %s", _PATH_CP,
   			    iamrecursive ? " -r" : "", pflag ? " -p" : "",
! 	 
	    argv[i], argv[argc - 1]);
   			if (verbose_mode)
   		 
	fprintf(stderr, "Executing: %s\n", bp);
   			if (system(bp))
--- 453,462 ----
   			len = strlen(_PATH_CP) + strlen(argv[i]) +
   			    strlen(argv[argc - 1]) + 20;
   			bp = xmalloc(len);
! 	 
	if (snprintf(bp, len, "exec %s%s%s %s %s", _PATH_CP,
   			    iamrecursive ? " -r" : "", pflag ? " -p" : "",
! 	 
		argv[i], argv[argc - 1]) < 0)
! 	 
	    fprintf (stderr, "command truncated: %s\n", bp);
   			if (verbose_mode)
   		 
	fprintf(stderr, "Executing: %s\n", bp);
   			if (system(bp))
***************
*** 471,477 ****
   		host = cleanhostname(host);
   		len = strlen(src) + CMDNEEDS + 20;
   		bp = xmalloc(len);
! 		(void) snprintf(bp, len, "%s -f %s", cmd, src);
   		if (do_cmd(host, suser, bp, &remin, &remout, argc) < 0) {
   			(void) xfree(bp);
   			++errs;
--- 481,490 ----
   		host = cleanhostname(host);
   		len = strlen(src) + CMDNEEDS + 20;
   		bp = xmalloc(len);
! 		if (snprintf(bp, len, "%s -f %s", cmd, src) < 0)
! 		    fprintf (stderr, "command truncated: %s\n", cmd);
! 		if (verbose_mode)
! 		    fprintf (stderr, "Executing: %s\n", bp);
   		if (do_cmd(host, suser, bp, &remin, &remout, argc) < 0) {
   			(void) xfree(bp);
   			++errs;




More information about the openssh-unix-dev mailing list