diff -u 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,18 +12,20 @@
 piddir=@piddir@
 srcdir=@srcdir@
 top_srcdir=@top_srcdir@
+program_prefix=@program_prefix@
 
 DESTDIR=
 VPATH=@srcdir@
-SSH_PROGRAM=@bindir@/ssh
-ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
-SFTP_SERVER=$(libexecdir)/sftp-server
+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_PATH_SSH_PIDDIR=\"$(piddir)\" \
+	-D_PROGRAM_PREFIX=\"$(program_prefix)\"
 
 CC=@CC@
 LD=@LD@
@@ -60,18 +62,25 @@
 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/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)/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/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)/sshrc \
+	-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,48 +196,48 @@
 	$(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
+	$(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/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
+	$(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)/ssh_config ]; then \
-		$(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
+	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)/ssh_config already exists, install will not overwrite"; \
+		echo "$(DESTDIR)$(sysconfdir)/$(program_prefix)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; \
+	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)/sshd_config already exists, install will not overwrite"; \
+		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)/ssh_prng_cmds ] ; then \
-			$(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \
+		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)/ssh_prng_cmds already exists, install will not overwrite"; \
+			echo "$(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_prng_cmds already exists, install will not overwrite"; \
 		fi ; \
 	fi
 	if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
@@ -244,32 +253,32 @@
 
 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." ; \
+		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)/ssh_host_key -N "" ; \
+			./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/$(program_prefix)ssh_host_key -N "" ; \
 		fi ; \
-		if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key ] ; then \
-			echo "$(DESTDIR)$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \
+		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)/ssh_host_dsa_key -N "" ; \
+			./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/$(program_prefix)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." ; \
+		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)/ssh_host_rsa_key -N "" ; \
+			./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)/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 ""
+	./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)/ssh_config
-	-rm -f $(DESTDIR)$(sysconfdir)/sshd_config
-	-rm -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds
+	-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,23 +288,23 @@
 	-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 -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/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
+	-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 -u 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,7 +218,7 @@
   --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
+  --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,6 +9339,7 @@
 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
Common subdirectories: openssh-2.9.9p2.orig/contrib and openssh-2.9.9p2/contrib
Common subdirectories: openssh-2.9.9p2.orig/openbsd-compat and openssh-2.9.9p2/openbsd-compat
diff -u 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,23 +20,26 @@
 #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 "/ssh_known_hosts"
+#define _PATH_SSH_SYSTEM_HOSTFILE	ETCDIR "/" _PROGRAM_PREFIX "ssh_known_hosts"
 /* backward compat for protocol 2 */
-#define _PATH_SSH_SYSTEM_HOSTFILE2	ETCDIR "/ssh_known_hosts2"
+#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 "/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_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,34 +48,38 @@
 #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 "/sshd.pid"
+#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		".ssh"
+#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		"~/.ssh/known_hosts"
+#define _PATH_SSH_USER_HOSTFILE		"~/" _PATH_SSH_USER_DIR "/known_hosts"
 /* backward compat for protocol 2 */
-#define _PATH_SSH_USER_HOSTFILE2	"~/.ssh/known_hosts2"
+#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	".ssh/identity"
-#define _PATH_SSH_CLIENT_ID_DSA		".ssh/id_dsa"
-#define _PATH_SSH_CLIENT_ID_RSA		".ssh/id_rsa"
+#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,7 +87,7 @@
  * 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"
+#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,10 +97,10 @@
  * 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"
+#define _PATH_SSH_USER_PERMITTED_KEYS	_PATH_SSH_USER_DIR "/authorized_keys"
 
 /* backward compat for protocol v2 */
-#define _PATH_SSH_USER_PERMITTED_KEYS2	".ssh/authorized_keys2"
+#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,8 +108,8 @@
  * 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"
+#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,7 +122,7 @@
  * Default location of askpass
  */
 #ifndef _PATH_SSH_ASKPASS_DEFAULT
-#define _PATH_SSH_ASKPASS_DEFAULT	"/usr/X11R6/bin/ssh-askpass"
+#define _PATH_SSH_ASKPASS_DEFAULT	"/usr/X11R6/bin/" _PROGRAM_PREFIX "ssh-askpass"
 #endif
 
 /* xauth for X11 forwarding */
@@ -130,7 +137,7 @@
 
 /* for sftp */
 #ifndef _PATH_SFTP_SERVER
-#define _PATH_SFTP_SERVER		"/usr/libexec/sftp-server"
+#define _PATH_SFTP_SERVER		"/usr/libexec/" _PROGRAM_PREFIX "sftp-server"
 #endif
 #ifndef _PATH_LS
 #define _PATH_LS			"ls"
@@ -147,15 +154,15 @@
 
 /* Askpass program define */
 #ifndef ASKPASS_PROGRAM
-#define ASKPASS_PROGRAM         "/usr/lib/ssh/ssh-askpass"
+#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"/prng_seed"
+# 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 "/ssh_prng_cmds"
+# define SSH_PRNG_COMMAND_FILE   ETCDIR "/" _PROGRAM_PREFIX "ssh_prng_cmds"
 #endif /* SSH_PRNG_COMMAND_FILE */
Common subdirectories: openssh-2.9.9p2.orig/scard and openssh-2.9.9p2/scard
diff -u 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,6 +132,7 @@
 
 /* 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,7 +243,7 @@
 	addargs(&args, "-oClearAllForwardings yes");
 
 	fflag = tflag = 0;
-	while ((ch = getopt(argc, argv, "dfprtvBCc:i:P:q46S:o:F:")) != -1)
+	while ((ch = getopt(argc, argv, "dfprtvBCc:i:P:q46Ss:o:F:")) != -1)
 		switch (ch) {
 		/* User-visible flags. */
 		case '4':
@@ -271,6 +272,9 @@
 		case 'S':
 			ssh_program = xstrdup(optarg);
 			break;
+		case 's':
+			scp_program = xstrdup(optarg);
+			break;
 		case 'v':
 			addargs(&args, "-v");
 			verbose_mode = 1;
@@ -327,17 +331,19 @@
 
 	remin = remout = -1;
 	/* Command to be executed on remote system using "ssh". */
-	(void) snprintf(cmd, sizeof cmd, "scp%s%s%s%s",
+	if (snprintf(cmd, sizeof cmd, "%s%s%s%s%s",
+		scp_program,
 	    verbose_mode ? " -v" : "",
 	    iamrecursive ? " -r" : "", pflag ? " -p" : "",
-	    targetshouldbedirectory ? " -d" : "");
+	    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);
+	    toremote(targ, argc, argv);
 	else {
-		tolocal(argc, argv);	/* Dest is local host. */
+	    tolocal(argc, argv);	/* Dest is local host. */
 		if (targetshouldbedirectory)
 			verifydir(argv[argc - 1]);
 	}
@@ -392,22 +398,24 @@
 					suser = pwd->pw_name;
 				else if (!okname(suser))
 					continue;
-				snprintf(bp, len,
+				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);
+					thost, targ) < 0)
+				    fprintf(stderr, "command truncated: %s\n", bp);
 			} else {
 				host = cleanhostname(argv[i]);
-				snprintf(bp, len,
+				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);
+					thost, targ) < 0)
+				    fprintf(stderr, "command truncated: %s\n", bp);
 			}
 			if (verbose_mode)
 				fprintf(stderr, "Executing: %s\n", bp);
@@ -417,7 +425,8 @@
 			if (remin == -1) {
 				len = strlen(targ) + CMDNEEDS + 20;
 				bp = xmalloc(len);
-				(void) snprintf(bp, len, "%s -t %s", cmd, targ);
+				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,9 +453,10 @@
 			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,
+			if (snprintf(bp, len, "exec %s%s%s %s %s", _PATH_CP,
 			    iamrecursive ? " -r" : "", pflag ? " -p" : "",
-			    argv[i], argv[argc - 1]);
+				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,7 +481,10 @@
 		host = cleanhostname(host);
 		len = strlen(src) + CMDNEEDS + 20;
 		bp = xmalloc(len);
-		(void) snprintf(bp, len, "%s -f %s", cmd, src);
+		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;
