Subject: Re: pkg/15358: SUBMISSION: new pkgsrc module for security/ssh2-3.1.0
To: NetBSD Bugs and PR posting List <netbsd-bugs@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 06/27/2002 16:31:05
Here's an update for PR#15358 for ssh2-3.2.0:

(untested as yet on 1.3.x -- seems I'll need to upgrade perl first... :-)

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	DESCR
#	Makefile
#	PLIST
#	distinfo
#	files
#	files/md5
#	files/patch-sum
#	files/sshd2.sh
#	patches
#	patches/patch-one
#
echo x - DESCR
sed 's/^X//' >DESCR << 'END-of-DESCR'
XSSH Protocols and Secure Shell
X
XSecure Shell is a program to log into another computer over a network,
Xto execute commands in a remote machine, and to move files from one
Xmachine to another.  It provides strong authentication and secure
Xcommunications over insecure channels.  It is intended as a replacement
Xfor rlogin, rsh, rcp, and rdist.  Optionally SSH will compress the data
Xit transfers.  Tunneling of arbitrary TCP connections is possible,
Xincluding for X11 and FTP (with temprary forwarding for the FTP data
Xchannels).
X
XWWW: http://www.ssh.com/
END-of-DESCR
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
X# $NetBSD$
X# FreeBSD Id: ports/security/ssh2/Makefile,v 1.102 2001/02/17 01:40:35 obrien Exp
X
XDISTNAME=	ssh-3.2.0
XPKGNAME=	ssh2-3.2.0	# it's protocol-v.2, release 3.2.0
XCATEGORIES=	security
XMASTER_SITES=	ftp://ftp.ssh.com/pub/ssh/ \
X		ftp://sunsite.unc.edu/pub/packages/security/ssh/
X
XMAINTAINER=	packages@netbsd.org
XHOMEPAGE=	http://www.ssh.com/
XCOMMENT=	Secure Shell client and server w/support for V.2 SSH protocol
X
XCONFLICTS=	openssh-[0-9]* ssh6-[0-9]* ssh-[0-9]* ssh2-2.[0-9]*
X
XCRYPTO=		YES
XLICENSE=	no-commercial-use
X
XBUILD_DEPENDS+= automake>=1.6:../../devel/automake
XBUILD_DEPENDS+= autoconf>=2.53:../../devel/autoconf
X
XUSE_GMAKE=	YES
XGNU_CONFIGURE=	YES
X
X# this will allow internal client compatability by default
XCONFIGURE_ARGS+=   --without-ssh-agent1-compat --without-ssh1-compat
X
X# we have no PAM, we want no PAM, PAM is evil and ugly.
XCONFIGURE_ARRG+=  --without-daemonpam --without-clientpam
X
X# this is necessary to support anonymous sftp, and other chrooted users
X# and of course it's a damn good idea for every program run by root anyway....
XCONFIGURE_ARGS+=  --enable-static
X
XPKG_SYSCONFSUBDIR?= ssh2
X
X.include "../../mk/bsd.prefs.mk"
X
X# yes, this really should include the subdirectory name....
XCONFIGURE_ARGS+= --with-etcdir=${PKG_SYSCONFDIR}
XCONFIGURE_ARGS+= --includedir=${PREFIX}/include/ssh2
X
X.if ${OPSYS} == "NetBSD"
XCONFIGURE_ARGS+= --with-libwrap
X.endif
X
X.if ${OPSYS} == "SunOS"
XDEPENDS+=	zlib-*:../../devel/zlib
XCONFIGURE_ENV+=	X_CFLAGS="-I${LOCALBASE}/include"
X.endif
X
XCONFIGURE_ARGS+= --with-x
X
X# Include support for the SecureID card
X# Warning: untested !
X.if defined(USE_SECUREID) && ${USE_SECUREID} == YES
XCONFIGURE_ARGS+= --with-clientsecureid --with-serversecurid
X.endif
X
X# XXX KERBEROS 5 SUPPORT BROKEN WITH HEIMDAL, and still EXPERIMENTAL in ssh2
X#.if defined(KERBEROS) && ${KERBEROS} == 5
X#USE_KERBEROS=  yes
X#CONFIGURE_ARGS+=--with-kerberos5=/usr
X#.else
X#CONFIGURE_ARGS+=--without-kerberos5
X#.endif
X
XPLIST_SUBST+=	INSTALL="${INSTALL}"			\
X		ROOT_GROUP="${ROOT_GROUP}"		\
X		PKG_SYSCONFDIR="${PKG_SYSCONFDIR}"
X
X# XXX we should be adding these to ${PLIST} ourselves....
X#
XPKGDOCS=	CHANGES FAQ HOWTO.anonymous.sftp INSTALL LICENSE \
X		README REGEX-SYNTAX SSH2.QUICKSTART
X
XPKGCONFIGS=	ssh2_config sshd2_config ssh_dummy_shell.out
X
XEGDIR=		${PREFIX}/share/examples/ssh2
X
Xpre-configure:
X	rm -f ${WRKSRC}/missing
X	cd ${WRKSRC} && ${LOCALBASE}/bin/autoreconf --force --install
X
Xpost-build:
X	@-rm -f ${WRKDIR}/sshd2.rc
X	${SED}  -e 's+@PREFIX@+${PREFIX}+' \
X		-e 's+@PKG_SYSCONFDIR@+${PKG_SYSCONFDIR}+' \
X		${FILESDIR}/sshd2.sh > ${WRKDIR}/sshd2.rc
X	${CHMOD} 555 ${WRKDIR}/sshd2.rc
X
X.if target(reinstall)
X# XXX hopefully this happens last
XINSTALL_TARGET+=	clean-up-old
X.endif
X
X# XXX The handling of sample configs is also done as @exec's in PLIST,
X# but should really be in a proper INSTALL script, if for no other
X# reason than so we don't have to maintain to slightly different
X# copies of the procedure.
X#
Xpost-install:
X	-${MKDIR} ${PREFIX}/share/doc/ssh2
X.for i in ${PKGDOCS}
X	${INSTALL_DATA} ${WRKSRC}/$i ${PREFIX}/share/doc/ssh2
X.endfor
X	${INSTALL_SCRIPT} -m 555 ${WRKDIR}/sshd2.rc ${PREFIX}/etc/rc.d/sshd2
X	@if [ ! -d ${PKG_SYSCONFDIR} ]; then \
X	    echo "Creating directory ${PKG_SYSCONFDIR} for ssh config files.." ; \
X	    mkdir -p ${PKG_SYSCONFDIR}; \
X	fi
X.for i in ${PKGCONFIGS}
X	@if [ ! -f ${PKG_SYSCONFDIR}/$i ]; then \
X	    echo "Installing example $i in ${PKG_SYSCONFDIR}..." ; \
X	    ${INSTALL} -c -o root -g ${ROOT_GROUP} -m 0644 ${EGDIR}/$i ${PKG_SYSCONFDIR} ; \
X	fi
X.endfor
X	@if [ ! -f ${PKG_SYSCONFDIR}/hostkey ]; then \
X	    ${PREFIX}/bin/ssh-keygen2 -P -b 1024 -t dsa -c "1024-bit dsa hostkey" ${PKG_SYSCONFDIR}/hostkey ; \
X	fi
X
X.include "../../mk/x11.buildlink.mk"
X.include "../../mk/bsd.pkg.mk"
END-of-Makefile
echo x - PLIST
sed 's/^X//' >PLIST << 'END-of-PLIST'
X@comment $NetBSD$
X@comment bin files next, in order installed
Xbin/ssh2
Xbin/scp2
Xbin/sftp2
Xbin/ssh-agent2
Xbin/ssh-keygen2
Xbin/ssh-add2
Xbin/ssh-signer2
Xbin/ssh-probe2
Xbin/ssh-askpass2
Xbin/ssh-dummy-shell.static
Xbin/sftp-server2.static
Xbin/sftp-server2
Xbin/ssh-dummy-shell
Xbin/ssh-pubkeymgr
Xbin/ssh-chrootmgr
X@comment bin symlinks next
Xbin/ssh
Xbin/slogin
Xbin/ssh-agent
Xbin/ssh-add
Xbin/ssh-askpass
Xbin/ssh-keygen
Xbin/scp
Xbin/sftp
Xbin/sftp-server
Xbin/ssh-signer
Xbin/ssh-probe
X@comment etc stuff....
Xetc/rc.d/sshd2
X@comment include files next
Xinclude/ssh2/bufzip.h
Xinclude/ssh2/libmonitor.h
Xinclude/ssh2/namelist.h
Xinclude/ssh2/sigchld.h
Xinclude/ssh2/ssh1encode.h
Xinclude/ssh2/ssh2pubkeyencode.h
Xinclude/ssh2/sshadt.h
Xinclude/ssh2/sshadt_array.h
Xinclude/ssh2/sshadt_assoc.h
Xinclude/ssh2/sshadt_avltree.h
Xinclude/ssh2/sshadt_bag.h
Xinclude/ssh2/sshadt_conv.h
Xinclude/ssh2/sshadt_impls.h
Xinclude/ssh2/sshadt_intmap.h
Xinclude/ssh2/sshadt_list.h
Xinclude/ssh2/sshadt_map.h
Xinclude/ssh2/sshadt_priority_heap.h
Xinclude/ssh2/sshadt_priority_queue.h
Xinclude/ssh2/sshadt_ranges.h
Xinclude/ssh2/sshadt_shortcuts.h
Xinclude/ssh2/sshadt_strmap.h
Xinclude/ssh2/sshadt_structs.h
Xinclude/ssh2/sshadt_xmap.h
Xinclude/ssh2/sshasn1.h
Xinclude/ssh2/sshasn1i.h
Xinclude/ssh2/sshbase16.h
Xinclude/ssh2/sshbase64.h
Xinclude/ssh2/sshber.h
Xinclude/ssh2/sshbitvector.h
Xinclude/ssh2/sshbprintf.h
Xinclude/ssh2/sshbufaux.h
Xinclude/ssh2/sshbuffer.h
Xinclude/ssh2/sshcipherlist.h
Xinclude/ssh2/sshcondition.h
Xinclude/ssh2/sshcrc32.h
Xinclude/ssh2/sshcrypt.h
Xinclude/ssh2/sshcstack.h
Xinclude/ssh2/sshdebug.h
Xinclude/ssh2/sshdecay.h
Xinclude/ssh2/sshdirectory.h
Xinclude/ssh2/sshdistdefs.h
Xinclude/ssh2/sshdlex.h
Xinclude/ssh2/sshdlib.h
Xinclude/ssh2/sshdllist.h
Xinclude/ssh2/sshdsprintf.h
Xinclude/ssh2/ssheloop.h
Xinclude/ssh2/sshencode.h
Xinclude/ssh2/sshenum.h
Xinclude/ssh2/sshfastalloc.h
Xinclude/ssh2/sshfdstream.h
Xinclude/ssh2/sshfilebuffer.h
Xinclude/ssh2/sshfileio.h
Xinclude/ssh2/sshfilelock.h
Xinclude/ssh2/sshfilexfer.h
Xinclude/ssh2/sshfilterstream.h
Xinclude/ssh2/sshfingerprint.h
Xinclude/ssh2/sshfsm.h
Xinclude/ssh2/sshfsm_internal.h
Xinclude/ssh2/sshfsmstreams.h
Xinclude/ssh2/sshgenmp.h
Xinclude/ssh2/sshgenutils.h
Xinclude/ssh2/sshgetopt.h
Xinclude/ssh2/sshgetput.h
Xinclude/ssh2/sshincludes.h
Xinclude/ssh2/sshincludes_unix.h
Xinclude/ssh2/sshinet.h
Xinclude/ssh2/sshinetencode.h
Xinclude/ssh2/sshkeyblob1.h
Xinclude/ssh2/sshkeyblob2.h
Xinclude/ssh2/sshkeyfile.h
Xinclude/ssh2/sshlocalstream.h
Xinclude/ssh2/sshmalloc.h
Xinclude/ssh2/sshmapping.h
Xinclude/ssh2/sshmatch.h
Xinclude/ssh2/sshmempool.h
Xinclude/ssh2/sshmempoolgen.h
Xinclude/ssh2/sshmiscstring.h
Xinclude/ssh2/sshmp-2adic.h
Xinclude/ssh2/sshmp-arithmetic.h
Xinclude/ssh2/sshmp-compat.h
Xinclude/ssh2/sshmp-convabs.h
Xinclude/ssh2/sshmp-integer.h
Xinclude/ssh2/sshmp-intmod.h
Xinclude/ssh2/sshmp-kernel.h
Xinclude/ssh2/sshmp-montgomery.h
Xinclude/ssh2/sshmp-powm.h
Xinclude/ssh2/sshmp-types.h
Xinclude/ssh2/sshmp.h
Xinclude/ssh2/sshmutex.h
Xinclude/ssh2/sshobstack.h
Xinclude/ssh2/ssholdfsm.h
Xinclude/ssh2/ssholdfsmstreams.h
Xinclude/ssh2/ssholdfsmstreams_states.h
Xinclude/ssh2/sshoperation.h
Xinclude/ssh2/sshpacketstream.h
Xinclude/ssh2/sshpgp.h
Xinclude/ssh2/sshproxykey.h
Xinclude/ssh2/sshprvkey.h
Xinclude/ssh2/sshpubkey.h
Xinclude/ssh2/sshrand.h
Xinclude/ssh2/sshreadline.h
Xinclude/ssh2/sshrefcnt.h
Xinclude/ssh2/sshregex.h
Xinclude/ssh2/sshrgf.h
Xinclude/ssh2/sshrotate.h
Xinclude/ssh2/sshsessionincludes.h
Xinclude/ssh2/sshsia.h
Xinclude/ssh2/sshsieve.h
Xinclude/ssh2/sshsignals.h
Xinclude/ssh2/sshsnlist.h
Xinclude/ssh2/sshsnprintf.h
Xinclude/ssh2/sshsocks.h
Xinclude/ssh2/sshstream.h
Xinclude/ssh2/sshstreampair.h
Xinclude/ssh2/sshstrmapping.h
Xinclude/ssh2/sshtcp.h
Xinclude/ssh2/sshthread.h
Xinclude/ssh2/sshthreadedmbox.h
Xinclude/ssh2/sshthreadpool.h
Xinclude/ssh2/sshtime.h
Xinclude/ssh2/sshtimemeasure.h
Xinclude/ssh2/sshtimeouts.h
Xinclude/ssh2/sshtty.h
Xinclude/ssh2/sshttymodes.h
Xinclude/ssh2/sshudp.h
Xinclude/ssh2/sshunixpipestream.h
Xinclude/ssh2/sshunixptystream.h
Xinclude/ssh2/sshurl.h
Xinclude/ssh2/sshuser.h
Xinclude/ssh2/sshuserfile.h
Xinclude/ssh2/sshuserfilebuf.h
Xinclude/ssh2/sshutf8.h
Xinclude/ssh2/sshzlibrename.h
Xinclude/ssh2/zconf.h
Xinclude/ssh2/zlib.h
X@comment sbin binaries next
Xsbin/sshd2
Xsbin/sshd-check-conf
X@comment sbin symlinks next
Xsbin/sshd
X@comment post-install docs
Xshare/doc/ssh2/CHANGES
Xshare/doc/ssh2/FAQ
Xshare/doc/ssh2/HOWTO.anonymous.sftp
Xshare/doc/ssh2/INSTALL
Xshare/doc/ssh2/LICENSE
Xshare/doc/ssh2/README
Xshare/doc/ssh2/REGEX-SYNTAX
Xshare/doc/ssh2/SSH2.QUICKSTART
X@comment example config files
Xshare/examples/ssh2/ssh2_config
Xshare/examples/ssh2/ssh_dummy_shell.out
Xshare/examples/ssh2/sshd2_config
Xshare/examples/ssh2/subconfig/host_ext
Xshare/examples/ssh2/subconfig/host_int
Xshare/examples/ssh2/subconfig/anonymous
Xshare/examples/ssh2/subconfig/user
X@comment manual pages
Xshare/man/man1/ssh2.1
Xshare/man/man1/ssh-keygen2.1
Xshare/man/man1/ssh-add2.1
Xshare/man/man1/ssh-agent2.1
Xshare/man/man1/scp2.1
Xshare/man/man1/sftp2.1
Xshare/man/man1/sshregex.1
Xshare/man/man1/ssh-probe2.1
Xshare/man/man1/ssh-dummy-shell.1
Xshare/man/man1/ssh-pubkeymgr.1
Xshare/man/man1/ssh-chrootmgr.1
Xshare/man/man5/ssh2_config.5
Xshare/man/man5/sshd-check-conf.5
Xshare/man/man5/sshd2_config.5
Xshare/man/man8/sshd2.8
X@comment share/man/man1 symlinks next
Xshare/man/man1/ssh.1
Xshare/man/man1/slogin.1
Xshare/man/man1/ssh-add.1
Xshare/man/man1/ssh-agent.1
Xshare/man/man1/ssh-keygen.1
Xshare/man/man1/scp.1
Xshare/man/man1/sftp.1
Xshare/man/man1/ssh-probe.1
X@comment share/man/man8 symlinks next
Xshare/man/man8/sshd.8
X@comment initial config procedures
X@comment XXX these @exec statements should be in an INSTALL script....
X@comment XXX and sometimes they don't seem to work in here!
X@comment XXX use smail INSTALL as prototype, also add /etc/rc.conf stuff
X@exec if [ ! -d ${PKG_SYSCONFDIR} ]; then echo "Creating directory ${PKG_SYSCONFDIR} for ssh config files.." ; mkdir -p ${PKG_SYSCONFDIR}; fi
X@exec if [ ! -f ${PKG_SYSCONFDIR}/ssh2_config ]; then echo "Installing example ssh2_config in ${PKG_SYSCONFDIR}.." ; ${INSTALL} -c -o root -g ${ROOT_GROUP} -m 0644 %D/share/examples/ssh2/ssh2_config ${PKG_SYSCONFDIR}; fi
X@exec if [ ! -f ${PKG_SYSCONFDIR}/sshd2_config ]; then echo "Installing example sshd2_config in ${PKG_SYSCONFDIR}.." ; ${INSTALL} -c -o root -g ${ROOT_GROUP} -m 0644 %D/share/examples/ssh2/sshd2_config ${PKG_SYSCONFDIR}; fi
X@exec if [ ! -f ${PKG_SYSCONFDIR}/ssh_dummy_shell.out ]; then echo "Installing example ssh_dummy_shell.out in ${PKG_SYSCONFDIR}.." ; ${INSTALL} -c -o root -g ${ROOT_GROUP} -m 0644 %D/share/examples/ssh2/ssh_dummy_shell.out ${PKG_SYSCONFDIR}; fi
X@exec if [ ! -f ${PKG_SYSCONFDIR}/hostkey ]; then echo "Generating a secret host key in ${PKG_SYSCONFDIR}.." ; %D/bin/ssh-keygen2 -P -b 1024 -t dsa -c "1024-bit dsa hostkey" ${PKG_SYSCONFDIR}/hostkey; fi
X@comment cleanup stuff:
X@dirrm share/doc/ssh2
X@dirrm share/examples/ssh2/subconfig
X@dirrm share/examples/ssh2
END-of-PLIST
echo x - distinfo
sed 's/^X//' >distinfo << 'END-of-distinfo'
X$NetBSD$
X
XSHA1 (ssh-3.2.0.tar.gz) = 13cefe3d4a890004a37b680b00bc119542247c16
XSize (ssh-3.2.0.tar.gz) = 2256240 bytes
XSHA1 (patch-one) = 35feb868b335ce516c29cff4255eaa5251a1f5d3
END-of-distinfo
echo c - files
mkdir -p files > /dev/null 2>&1
echo x - files/md5
sed 's/^X//' >files/md5 << 'END-of-files/md5'
X$NetBSD$
X
XMD5 (ssh-2.4.0.tar.gz) = 5dd7b36334baf08afa5c637875f59d4a
END-of-files/md5
echo x - files/patch-sum
sed 's/^X//' >files/patch-sum << 'END-of-files/patch-sum'
X$NetBSD$
X
XMD5 (patch-one) = b537f6d65f1ff21752ea3468a3369fff
END-of-files/patch-sum
echo x - files/sshd2.sh
sed 's/^X//' >files/sshd2.sh << 'END-of-files/sshd2.sh'
X#! /bin/sh
X#
X# $NetBSD$
X#
X
X# PROVIDE: sshd
X# REQUIRE: LOGIN
X
X. /etc/rc.subr
X
Xname="sshd2"
Xrcvar=$name
Xcommand="@PREFIX@/sbin/${name}"
Xrequired_files="@PKG_SYSCONFDIR@/${name}_config"
XPORT=$(grep Port ${required_files} | awk '{ x = $2 } END {print x}' -)
Xpidfile="/var/run/${name}_${PORT}.pid"
Xextra_commands="keygen reload"
X
X
Xsshd_keygen2()
X{
X	if [ -f @PKG_SYSCONFDIR@/hostkey ]; then
X		echo "You already have a DSA host key in @PKG_SYSCONFDIR@/hostkey"
X		echo "Skipping DSA Key Generation"
X	else
X		umask 022
X		@PREFIX@/bin/ssh-keygen2 -P -b 1024 -t dsa -c "1024-bit dsa hostkey" @PKG_SYSCONFDIR@/hostkey
X	fi
X
X}
X
Xsshd_precmd2()
X{
X	if [ ! -f @PKG_SYSCONFDIR@/hostkey ]; then
X		sshd_keygen2
X	fi
X}
X
X# in 1.5 or newer we could just do:
X#
X#load_rc_config $name
X
X. /etc/rc.conf
Xif [ -f /etc/rc.conf.d/${name} ]; then
X	. /etc/rc.conf.d/${name}
Xfi
Xif [ -f @PREFIX@/etc/rc.conf.d/${name} ]; then
X	. @PREFIX@/etc/rc.conf.d/${name}
Xfi
X
X# in 1.5 or newer we could just do:
X#
X#run_rc_command "$1"
X
Xif ! checkyesno $rcvar; then
X	echo "\$${rcvar} is not set."
X	exit 1
Xfi
X
Xcase "$1" in
Xstart)
X	echo -n " "
X	sshd_precmd2
X	${command}
X	;;
Xstop)
X	if [ -f ${pidfile} ]; then
X		echo -n " ${name}"
X		pid=$(head -1 ${pidfile})
X		kill -15 $pid
X	else
X		echo -n " ${name} is not running."
X	fi
X	;;
Xrestart)
X	$0 stop
X	$0 start
X	;;
Xreload)
X	if [ -f ${pidfile} ]; then
X		echo -n " ${name}"
X		pid=$(head -1 ${pidfile})
X		kill -1 $pid
X	else
X		echo -n " ${name} is not running."
X	fi
X	;;
Xstatus)
X	if [ -f ${pidfile} ]; then
X		pid=$(head -1 ${pidfile})
X		echo "${name} is running as PID ${pid}."
X	else
X		echo "${name} is not running."
X	fi
X	;;
X*)
X	echo "Usage: $0 {start|stop|restart|status}" 1>&2
X	exit 1
Xesac
X
Xexit 0
END-of-files/sshd2.sh
echo c - patches
mkdir -p patches > /dev/null 2>&1
echo x - patches/patch-one
sed 's/^X//' >patches/patch-one << 'END-of-patches/patch-one'
XIndex: projects/ssh-f-configd/Makefile.am
X===================================================================
XRCS file: /cvs/misc/ssh3/projects/ssh-f-configd/Makefile.am,v
Xretrieving revision 1.1.1.2
Xdiff -c -r1.1.1.2 Makefile.am
X*** projects/ssh-f-configd/Makefile.am	17 Jan 2002 20:16:16 -0000	1.1.1.2
X***************
X*** 44,50 ****
X  
X  INCLUDES_windelta = -@SSH_F_SECURE_FSMA_CLIENT_INCLUDES@
X  
X! CFLAGS += -DETCDIR=\"$(ETCDIR)\"
X  
X  EXTRA_DIST = \
X  	README.SSH-F-CONFIGD	
X--- 44,50 ----
X  
X  INCLUDES_windelta = -@SSH_F_SECURE_FSMA_CLIENT_INCLUDES@
X  
X! AM_CFLAGS = -DETCDIR=\"$(ETCDIR)\"
X  
X  EXTRA_DIST = \
X  	README.SSH-F-CONFIGD	
XIndex: lib/sshutil/sshnet/sshunixtcp.c
X===================================================================
XRCS file: /cvs/misc/ssh3/lib/sshutil/sshnet/sshunixtcp.c,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 sshunixtcp.c
X*** lib/sshutil/sshnet/sshunixtcp.c	26 Jun 2002 19:31:47 -0000	1.1.1.3
X***************
X*** 1130,1135 ****
X--- 1130,1138 ----
X  #if !defined(HAVE_GETHOSTNAME) && defined(HAVE_UNAME)
X    struct utsname uts;
X  #endif
X+ #ifdef HAVE_GETDOMAINNAME
X+   size_t curlen;
X+ #endif
X  
X  #ifdef HAVE_GETHOSTNAME
X    if (gethostname(buf, buflen) < 0)
X***************
X*** 1137,1142 ****
X--- 1140,1161 ----
X        ssh_debug("gethostname failed, buflen %u, errno %d", buflen, errno);
X        strncpy(buf, "UNKNOWN", buflen);
X      }
X+ # ifdef HAVE_GETDOMAINNAME
X+   curlen = strlen(buf);
X+   if (! strchr(buf, '.') && curlen < (MAXHOSTNAMELEN - 2))
X+     {
X+       strcat(buf, ".");
X+       if (getdomainname(buf + curlen + 1, buflen - curlen - 1) < 0)
X+         {
X+           ssh_debug("getdomainname failed, buflen %u: %s", buflen - curlen - 1, strerror(errno));
X+ 	}
X+       /* if domain name already started with a period, shift it back one */
X+       if (*(buf + curlen + 1) == '.')
X+         {
X+           strcpy(buf + curlen + 1, buf + curlen + 2);
X+ 	}
X+     }
X+ # endif /* HAVE_GETDOMAINNAME */
X  #else /* HAVE_GETHOSTNAME */
X  # ifdef HAVE_UNAME
X    if (uname(&uts) < 0)
XIndex: lib/sshutil/sshcore/strerror.c
X===================================================================
XRCS file: /cvs/misc/ssh3/lib/sshutil/sshcore/strerror.c,v
Xretrieving revision 1.1.1.2
Xdiff -c -r1.1.1.2 strerror.c
X*** lib/sshutil/sshcore/strerror.c	17 Jan 2002 20:15:43 -0000	1.1.1.2
X***************
X*** 45,50 ****
X--- 45,51 ----
X   */
X  
X  #ifndef VXWORKS
X+ # ifndef HAVE_STRERROR
X  #include <stdio.h>
X  #include <errno.h>
X  
X***************
X*** 58,61 ****
X--- 59,63 ----
X    else
X      return "Bad error code";
X  }
X+ # endif
X  #endif /* VXWORKS */
XIndex: lib/sshutil/sshcore/Makefile.am
X===================================================================
XRCS file: /cvs/misc/ssh3/lib/sshutil/sshcore/Makefile.am,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 Makefile.am
X*** lib/sshutil/sshcore/Makefile.am	26 Jun 2002 19:31:50 -0000	1.1.1.3
X***************
X*** 18,24 ****
X  	libsshcore.a 
X  
X  
X! CONFOBJS = @LIBOBJS@
X  
X  libsshcore_a_SOURCES =          \
X          sshdebug.c              \
X--- 18,24 ----
X  	libsshcore.a 
X  
X  
X! #CONFOBJS = @LIBOBJS@
X  
X  libsshcore_a_SOURCES =          \
X          sshdebug.c              \
XIndex: lib/sshsession/sshunixuser.c
X===================================================================
XRCS file: /cvs/misc/ssh3/lib/sshsession/sshunixuser.c,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 sshunixuser.c
X*** lib/sshsession/sshunixuser.c	26 Jun 2002 19:32:16 -0000	1.1.1.3
X***************
X*** 1854,1859 ****
X--- 1854,1868 ----
X          }
X  
X        endgrent();
X+ 
X+       /* groups array is assumed to end in a NULL pointer, so make sure we have
X+ 	 room for it... */
X+       if (count >= allocated)
X+         {
X+ 	  allocated += 1;
X+ 	  groups = ssh_xrealloc(groups,
X+ 				allocated*sizeof(SshGroup));
X+ 	}
X        groups[count] = NULL;
X        uc->groups = groups;
X  #else /* HAVE_GETGRENT */
X***************
X*** 1863,1868 ****
X--- 1872,1878 ----
X        uc->groups[0] = ssh_xcalloc(1, sizeof(struct SshGroupRec));
X        uc->groups[0]->gid = ssh_user_gid(uc);
X        uc->groups[0]->name = ssh_xstrdup(ssh_group_name(uc));
X+       uc->groups[1] = NULL;	/* not strictly necessary due to ssh_xcalloc() */
X  #endif /* HAVE_GETGRENT */
X      }
X    return uc->groups;
XIndex: lib/sshsession/pty-bsd.c
X===================================================================
XRCS file: /cvs/misc/ssh3/lib/sshsession/pty-bsd.c,v
Xretrieving revision 1.1.1.1
Xdiff -c -r1.1.1.1 pty-bsd.c
X*** lib/sshsession/pty-bsd.c	17 Aug 2001 18:46:51 -0000	1.1.1.1
X***************
X*** 27,35 ****
X--- 27,40 ----
X    const char *ptymajors = "pqrsPQRS";
X    const char *ptyminors = "0123456789abcdefghijklmnopqrstuv";
X  #else
X+ # ifdef __NetBSD__
X+   const char *ptymajors = "pqrstuwxyzPQRST";
X+   const char *ptyminors = "0123456789abcdef";
X+ # else
X    const char *ptymajors = 
X      "pqrstuvwxyzabcdefghijklmnoABCDEFGHIJKLMNOPQRSTUVWXYZ";
X    const char *ptyminors = "0123456789abcdef";
X+ # endif
X  #endif
X    int num_minors = strlen(ptyminors);
X    int num_ptys = strlen(ptymajors) * num_minors;
XIndex: lib/sshapputil/sshuserfile.c
X===================================================================
XRCS file: /cvs/misc/ssh3/lib/sshapputil/sshuserfile.c,v
Xretrieving revision 1.1.1.2
Xdiff -c -r1.1.1.2 sshuserfile.c
X*** lib/sshapputil/sshuserfile.c	17 Jan 2002 20:15:49 -0000	1.1.1.2
X***************
X*** 339,347 ****
X  #include <rpc/rpc.h>
X  #endif /* SECURE_RPC */
X  
X! #if defined (__FreeBSD__) && defined(HAVE_LOGIN_CAP_H)
X  #include <login_cap.h>
X! #endif /* __FreeBSD__ && HAVE_LOGIN_CAP_H */
X  
X  #ifdef HAVE_GRP_H
X  #include <grp.h>
X--- 339,347 ----
X  #include <rpc/rpc.h>
X  #endif /* SECURE_RPC */
X  
X! #if defined(HAVE_LOGIN_CAP_H)
X  #include <login_cap.h>
X! #endif /* HAVE_LOGIN_CAP_H */
X  
X  #ifdef HAVE_GRP_H
X  #include <grp.h>
X***************
X*** 907,920 ****
X    
X    if (uid != geteuid() || uid != getuid())
X      {
X! #if defined (__FreeBSD__) && defined(HAVE_LOGIN_CAP_H)
X        struct passwd * pw = getpwuid(uid);
X        login_cap_t * lc = login_getuserclass(pw);
X        if (setusercontext(lc, pw, uid,
X                           LOGIN_SETALL & ~(LOGIN_SETLOGIN | LOGIN_SETPATH |
X                                            LOGIN_SETENV)) < 0)
X          ssh_fatal("setusercontext: %s", strerror(errno));
X! #else /* ! (__FreeBSD && HAVE_LOGIN_CAP_H) */
X        if (setgid(gid) < 0)
X          ssh_fatal("setgid: %s", strerror(errno));
X  
X--- 907,925 ----
X    
X    if (uid != geteuid() || uid != getuid())
X      {
X! #if defined(HAVE_LOGIN_CAP_H) && (defined(HAVE_LOGIN_GETUSERCLASS) || defined(HAVE_LOGIN_GETUSER))
X        struct passwd * pw = getpwuid(uid);
X+ # ifdef HAVE_LOGIN_GETUSERCLASS
X        login_cap_t * lc = login_getuserclass(pw);
X+ # endif
X+ # ifdef HAVE_LOGIN_GETUSER
X+       login_cap_t * lc = login_getuser(pw);
X+ # endif
X        if (setusercontext(lc, pw, uid,
X                           LOGIN_SETALL & ~(LOGIN_SETLOGIN | LOGIN_SETPATH |
X                                            LOGIN_SETENV)) < 0)
X          ssh_fatal("setusercontext: %s", strerror(errno));
X! #else /* ! (HAVE_LOGIN_CAP_H) */
X        if (setgid(gid) < 0)
X          ssh_fatal("setgid: %s", strerror(errno));
X  
XIndex: apps/ssh/sshstdiofilter.c
X===================================================================
XRCS file: /cvs/misc/ssh3/apps/ssh/sshstdiofilter.c,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 sshstdiofilter.c
X*** apps/ssh/sshstdiofilter.c	26 Jun 2002 19:32:24 -0000	1.1.1.3
X***************
X*** 301,307 ****
X  
X  #endif /* SSHDIST_SSH2_INTERNAL_SSH1_EMULATION */
X  
X!   ssh_tcp_get_host_name(local_host_name, MAXHOSTNAMELEN);
X  
X    if (client->config->host_to_connect)
X      fprintf(stderr, "remote host: %s\n", client->config->host_to_connect);
X--- 301,307 ----
X  
X  #endif /* SSHDIST_SSH2_INTERNAL_SSH1_EMULATION */
X  
X!   ssh_tcp_get_host_name(local_host_name, sizeof(local_host_name));
X  
X    if (client->config->host_to_connect)
X      fprintf(stderr, "remote host: %s\n", client->config->host_to_connect);
XIndex: apps/ssh/sshd2_config
X===================================================================
XRCS file: /cvs/misc/ssh3/apps/ssh/sshd2_config,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 sshd2_config
X*** apps/ssh/sshd2_config	26 Jun 2002 19:32:33 -0000	1.1.1.3
X***************
X*** 8,21 ****
X  
X  ## General
X  
X! #	HostKeyFile			hostkey
X! #	PublicHostKeyFile		hostkey.pub
X  #	RandomSeedFile			random_seed
X  #	BannerMessageFile		/etc/ssh2/ssh_banner_message
X  #	BannerMessageFile		/etc/issue.net
X  #
X  #	VerboseMode			no
X! #	QuietMode			no
X  #	SyslogFacility			AUTH
X  #	SyslogFacility			LOCAL7
X  #	SftpSyslogFacility		LOCAL7
X--- 8,21 ----
X  
X  ## General
X  
X! 	HostKeyFile			hostkey
X! 	PublicHostKeyFile		hostkey.pub
X  #	RandomSeedFile			random_seed
X  #	BannerMessageFile		/etc/ssh2/ssh_banner_message
X  #	BannerMessageFile		/etc/issue.net
X  #
X  #	VerboseMode			no
X! 	QuietMode			no
X  #	SyslogFacility			AUTH
X  #	SyslogFacility			LOCAL7
X  #	SftpSyslogFacility		LOCAL7
X***************
X*** 26,33 ****
X  # scripts. Well, the default won't likely change.
X  	Port 				22
X  #	ListenAddress			any
X! #	ResolveClientHostName		yes
X! #	RequireReverseMapping		no
X  #	MaxBroadcastsPerSecond		0
X  #	MaxBroadcastsPerSecond		1  
X  #	NoDelay				no
X--- 26,33 ----
X  # scripts. Well, the default won't likely change.
X  	Port 				22
X  #	ListenAddress			any
X! 	ResolveClientHostName		yes
X! 	RequireReverseMapping		yes
X  #	MaxBroadcastsPerSecond		0
X  #	MaxBroadcastsPerSecond		1  
X  #	NoDelay				no
X***************
X*** 68,74 ****
X  # This variable is set here, because by default it's empty, and so no
X  # variables can be set. Because of that, we set a few common ones here.
X  	SettableEnvironmentVars		LANG,LC_(ALL|COLLATE|CTYPE|MONETARY|NUMERIC|TIME),PATH,TERM,TZ
X- 	
X  ## Tunneling
X  
X  #	AllowX11Forwarding		yes
X--- 68,73 ----
X***************
X*** 98,103 ****
X--- 97,103 ----
X  ## Authentication
X  ## publickey and password allowed by default
X  
X+ 	AllowedAuthentications		hostbased,publickey,password
X  #	AllowedAuthentications		publickey,password
X  #	AllowedAuthentications		hostbased,publickey,password
X  #	AllowedAuthentications		hostbased,publickey,keyboard-interactive
X***************
X*** 105,111 ****
X  #	LoginGraceTime			600
X  #	AuthInteractiveFailureTimeout	2
X  #
X! #	HostbasedAuthForceClientHostnameDNSMatch no
X  #	UserKnownHosts			yes
X  #
X  #	AuthPublicKey.MaxSize		0
X--- 105,111 ----
X  #	LoginGraceTime			600
X  #	AuthInteractiveFailureTimeout	2
X  #
X! 	HostbasedAuthForceClientHostnameDNSMatch yes
X  #	UserKnownHosts			yes
X  #
X  #	AuthPublicKey.MaxSize		0
X***************
X*** 168,174 ****
X  #	DenyUsers			don@untrusted\.org
X  #	AllowGroups			staff,users
X  #	DenyGroups			guest,anonymous
X! #	PermitRootLogin			yes
X  #	PermitRootLogin			nopwd
X  
X  ## Chrooted environment
X--- 168,174 ----
X  #	DenyUsers			don@untrusted\.org
X  #	AllowGroups			staff,users
X  #	DenyGroups			guest,anonymous
X! 	PermitRootLogin			no
X  #	PermitRootLogin			nopwd
X  
X  ## Chrooted environment
XIndex: apps/ssh/sshconfig.c
X===================================================================
XRCS file: /cvs/misc/ssh3/apps/ssh/sshconfig.c,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 sshconfig.c
X*** apps/ssh/sshconfig.c	26 Jun 2002 19:32:24 -0000	1.1.1.3
X***************
X*** 2668,2674 ****
X  
X    SshUserFile f;
X    char **vars, **vals, *var = NULL, *val = NULL, *hlp;
X!   char linebuf[1024];
X    size_t n;
X    int j, k;
X    int line, ch;
X--- 2668,2674 ----
X  
X    SshUserFile f;
X    char **vars, **vals, *var = NULL, *val = NULL, *hlp;
X!   char linebuf[8192];				/* XXX this is stupid! */
X    size_t n;
X    int j, k;
X    int line, ch;
X***************
X*** 3458,3464 ****
X                               O_RDONLY, 0755)) != NULL)
X      {
X        SshBufferStruct buf;
X!       char linebuf[1024];
X  
X        uid = getuid();
X  
X--- 3458,3464 ----
X                               O_RDONLY, 0755)) != NULL)
X      {
X        SshBufferStruct buf;
X!       char linebuf[8192];			/* XXX this is stupid! */
X  
X        uid = getuid();
X  
XIndex: apps/ssh/sshchx11.c
X===================================================================
XRCS file: /cvs/misc/ssh3/apps/ssh/sshchx11.c,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 sshchx11.c
X*** apps/ssh/sshchx11.c	26 Jun 2002 19:32:27 -0000	1.1.1.3
X***************
X*** 680,686 ****
X                                          size_t len)
X  {
X    int display_number;
X!   char buf[512], hostname[257];
X    struct stat st;
X    SshChannelX11Session session;
X    SshChannelTypeX11 ct;
X--- 680,686 ----
X                                          size_t len)
X  {
X    int display_number;
X!   char buf[512], hostname[MAXHOSTNAMELEN+1];
X    struct stat st;
X    SshChannelX11Session session;
X    SshChannelTypeX11 ct;
X***************
X*** 776,787 ****
X       appears to be enabled if the host name matches that of the local
X       machine.  However, it can be circumvented by using the IP address
X       of the local machine instead.  */
X!   if (gethostname(buf, sizeof(buf)) < 0)
X      ssh_fatal("gethostname: %s", strerror(errno));
X    {
X      struct hostent *hp;
X      struct in_addr addr;
X!     hp = gethostbyname(buf);
X      if (hp == NULL || !hp->h_addr_list[0])
X        {
X          ssh_warning("Could not get server IP address for %.200s.", buf);
X--- 776,787 ----
X       appears to be enabled if the host name matches that of the local
X       machine.  However, it can be circumvented by using the IP address
X       of the local machine instead.  */
X!   if (gethostname(buf, sizeof(buf)) < 0)	/* XXX bogus! */
X      ssh_fatal("gethostname: %s", strerror(errno));
X    {
X      struct hostent *hp;
X      struct in_addr addr;
X!     hp = gethostbyname(buf);			/* XXX bogus! */
X      if (hp == NULL || !hp->h_addr_list[0])
X        {
X          ssh_warning("Could not get server IP address for %.200s.", buf);
XIndex: apps/ssh/ssh2.c
X===================================================================
XRCS file: /cvs/misc/ssh3/apps/ssh/ssh2.c,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 ssh2.c
X*** apps/ssh/ssh2.c	26 Jun 2002 19:32:21 -0000	1.1.1.3
X***************
X*** 413,419 ****
X  {
X    SshClientData data = (SshClientData)context;
X  
X!   client_debug_output(stderr, "Received signal %d. (no core)\r\n", sig);
X    if (data && data->client && data->client->rl)
X      {
X        ssh_readline_eloop_uninitialize(data->client->rl);
X--- 413,420 ----
X  {
X    SshClientData data = (SshClientData)context;
X  
X!   if (sig != SIGPIPE)
X!     client_debug_output(stderr, "Received signal %d. (no core)\r\n", sig);
X    if (data && data->client && data->client->rl)
X      {
X        ssh_readline_eloop_uninitialize(data->client->rl);
X***************
X*** 426,432 ****
X    /* To get a meaningful exit value. We can't use exit(255-sig), because
X       SIGHUP (=1) would have same return value as lot of catch-22:s in
X       the code. */
X!   exit(sig + 128);
X  }
X  
X  void sigpipe_nonfatal_cb(int sig, void *context)
X--- 427,433 ----
X    /* To get a meaningful exit value. We can't use exit(255-sig), because
X       SIGHUP (=1) would have same return value as lot of catch-22:s in
X       the code. */
X!   exit(sig == SIGPIPE ? 0 : sig + 128);
X  }
X  
X  void sigpipe_nonfatal_cb(int sig, void *context)
X***************
X*** 741,747 ****
X    else
X      {
X        if (isatty(fileno(stdout)) && data->config->auth_success_msg)
X!         ssh_informational("Authentication successful.\r\n");
X  
X  
X        /* If we are requested to go to background, do it now. */
X--- 742,748 ----
X    else
X      {
X        if (isatty(fileno(stdout)) && data->config->auth_success_msg)
X!         ssh_debug("Authentication successful.\r\n");
X  
X  
X        /* If we are requested to go to background, do it now. */
X***************
X*** 1128,1134 ****
X    INFO("SSH is a registered trademark and Secure Shell is a trademark of\n"
X         "SSH Communications Security Corp (www.ssh.com).\n");
X  
X!   INFO("All rights reserved.  See LICENSE file for usage and distribution "
X         "terms.\n");
X  
X  
X--- 1129,1135 ----
X    INFO("SSH is a registered trademark and Secure Shell is a trademark of\n"
X         "SSH Communications Security Corp (www.ssh.com).\n");
X  
X!   INFO("All rights reserved.  See LICENSE file for distribution "
X         "terms.\n");
X  
X  
XIndex: apps/ssh/scp2.c
X===================================================================
XRCS file: /cvs/misc/ssh3/apps/ssh/scp2.c,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 scp2.c
X*** apps/ssh/scp2.c	26 Jun 2002 19:32:30 -0000	1.1.1.3
X***************
X*** 1145,1150 ****
X--- 1145,1151 ----
X                        "that scp1 is in your PATH).");
X            }
X            break;
X+ #if defined(SSH1_COMPATIBILITY)
X          case '1':
X            /* Scp 1 compatibility in the client */
X            {
X***************
X*** 1177,1182 ****
X--- 1178,1184 ----
X                        "that scp1 is in your PATH).");
X            }
X            break;
X+ #endif
X  
X  
X  
XIndex: apps/ssh/Makefile.am
X===================================================================
XRCS file: /cvs/misc/ssh3/apps/ssh/Makefile.am,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 Makefile.am
X*** apps/ssh/Makefile.am	26 Jun 2002 19:32:20 -0000	1.1.1.3
X***************
X*** 579,584 ****
X--- 579,586 ----
X  includes:
X  
X  make-install-dirs:
X+ 	-if test '!' -d $(DESTDIR)$(datadir)/examples/ssh2; then mkdir -p $(DESTDIR)$(datadir)/examples/ssh2; fi
X+ 	-if test '!' -d $(DESTDIR)$(datadir)/examples/ssh2/subconfig; then mkdir -p $(DESTDIR)$(datadir)/examples/ssh2/subconfig; fi
X  	-if test '!' -d $(DESTDIR)$(etcdir); then mkdir -p $(DESTDIR)$(etcdir); fi
X  	-if test '!' -d $(DESTDIR)$(known_hosts_dir); then mkdir -p $(DESTDIR)$(known_hosts_dir); fi
X  	-if test '!' -d $(DESTDIR)$(host_keys_dir); then mkdir -p $(DESTDIR)$(host_keys_dir); fi
X***************
X*** 594,599 ****
X--- 596,602 ----
X  
X  install-symlinks:
X  	-mv -f $(DESTDIR)$(bindir)/ssh $(DESTDIR)$(bindir)/ssh.old
X+ 	-mv -f $(DESTDIR)$(bindir)/slogin $(DESTDIR)$(bindir)/slogin.old
X  	-mv -f $(DESTDIR)$(bindir)/ssh-agent $(DESTDIR)$(bindir)/ssh-agent.old
X  	-mv -f $(DESTDIR)$(bindir)/ssh-add $(DESTDIR)$(bindir)/ssh-add.old
X  	-mv -f $(DESTDIR)$(bindir)/ssh-askpass $(DESTDIR)$(bindir)/ssh-askpass.old
X***************
X*** 603,610 ****
X  	-mv -f $(DESTDIR)$(bindir)/sftp-server $(DESTDIR)$(bindir)/sftp-server.old
X  	-mv -f $(DESTDIR)$(bindir)/ssh-signer $(DESTDIR)$(bindir)/ssh-signer.old
X  	-mv -f $(DESTDIR)$(bindir)/ssh-probe $(DESTDIR)$(bindir)/ssh-probe.old
X- 
X  	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh2 ssh)
X  	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-agent2 ssh-agent)
X  	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-add2 ssh-add)
X  	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-askpass2 ssh-askpass)
X--- 606,613 ----
X  	-mv -f $(DESTDIR)$(bindir)/sftp-server $(DESTDIR)$(bindir)/sftp-server.old
X  	-mv -f $(DESTDIR)$(bindir)/ssh-signer $(DESTDIR)$(bindir)/ssh-signer.old
X  	-mv -f $(DESTDIR)$(bindir)/ssh-probe $(DESTDIR)$(bindir)/ssh-probe.old
X  	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh2 ssh)
X+ 	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh2 slogin)
X  	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-agent2 ssh-agent)
X  	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-add2 ssh-add)
X  	(cd $(DESTDIR)$(bindir) && $(LN_S) ssh-askpass2 ssh-askpass)
X***************
X*** 617,622 ****
X--- 620,626 ----
X  	-mv -f $(DESTDIR)$(sbindir)/sshd $(DESTDIR)$(sbindir)/sshd.old
X  	(cd $(DESTDIR)$(sbindir) && $(LN_S) sshd2 sshd)
X  	-mv -f $(DESTDIR)$(mandir)/man1/ssh.1 $(DESTDIR)$(mandir)/man1/ssh.old.1
X+ 	-mv -f $(DESTDIR)$(mandir)/man1/slogin.1 $(DESTDIR)$(mandir)/man1/slogin.old.1
X  	-mv -f $(DESTDIR)$(mandir)/man1/ssh-add.1 $(DESTDIR)$(mandir)/man1/ssh-add.old.1
X  	-mv -f $(DESTDIR)$(mandir)/man1/ssh-agent.1 $(DESTDIR)$(mandir)/man1/ssh-agent.old.1
X  	-mv -f $(DESTDIR)$(mandir)/man1/ssh-keygen.1 $(DESTDIR)$(mandir)/man1/ssh-keygen.old.1
X***************
X*** 624,629 ****
X--- 628,634 ----
X  	-mv -f $(DESTDIR)$(mandir)/man1/sftp.1 $(DESTDIR)$(mandir)/man1/sftp.old.1
X  	-mv -f $(DESTDIR)$(mandir)/man1/ssh-probe.1 $(DESTDIR)$(mandir)/man1/ssh-probe.old.1
X  	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh2.1 ssh.1)
X+ 	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh2.1 slogin.1)
X  	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-add2.1 ssh-add.1)
X  	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-agent2.1 ssh-agent.1)
X  	(cd $(DESTDIR)$(mandir)/man1 && $(LN_S) ssh-keygen2.1 ssh-keygen.1)
X***************
X*** 634,646 ****
X  	(cd $(DESTDIR)$(mandir)/man8 && $(LN_S) sshd2.8 sshd.8)
X  
X  clean-up-old:
X! 	 -rm -f $(DESTDIR)$(bindir)/ssh.old $(DESTDIR)$(bindir)/ssh-agent.old \
X  	 $(DESTDIR)$(bindir)/ssh-add.old $(DESTDIR)$(bindir)/ssh-askpass.old  \
X  	 $(DESTDIR)$(bindir)/ssh-keygen.old $(DESTDIR)$(bindir)/scp.old	  \
X  	 $(DESTDIR)$(bindir)/sftp.old $(DESTDIR)$(bindir)/sftp-server.old     \
X  	 $(DESTDIR)$(bindir)/ssh-signer.old $(DESTDIR)$(bindir)/ssh-probe.old \
X  	 $(sbindir)/sshd.old
X! 	 -rm -f $(DESTDIR)$(mandir)/man1/ssh-add.old.1 $(DESTDIR)$(mandir)/man1/ssh.old.1   \
X  	 $(DESTDIR)$(mandir)/man1/ssh-agent.old.1 $(DESTDIR)$(mandir)/man1/ssh-keygen.old.1	\
X  	 $(DESTDIR)$(mandir)/man1/scp.old.1 $(DESTDIR)$(mandir)/man1/sftp.old.1             \
X  	 $(DESTDIR)$(mandir)/man8/sshd.old.8
X--- 639,651 ----
X  	(cd $(DESTDIR)$(mandir)/man8 && $(LN_S) sshd2.8 sshd.8)
X  
X  clean-up-old:
X! 	 -rm -f $(DESTDIR)$(bindir)/ssh.old $(DESTDIR)$(bindir)/slogin.old $(DESTDIR)$(bindir)/ssh-agent.old \
X  	 $(DESTDIR)$(bindir)/ssh-add.old $(DESTDIR)$(bindir)/ssh-askpass.old  \
X  	 $(DESTDIR)$(bindir)/ssh-keygen.old $(DESTDIR)$(bindir)/scp.old	  \
X  	 $(DESTDIR)$(bindir)/sftp.old $(DESTDIR)$(bindir)/sftp-server.old     \
X  	 $(DESTDIR)$(bindir)/ssh-signer.old $(DESTDIR)$(bindir)/ssh-probe.old \
X  	 $(sbindir)/sshd.old
X! 	 -rm -f $(DESTDIR)$(mandir)/man1/ssh-add.old.1 $(DESTDIR)$(mandir)/man1/ssh.old.1 $(DESTDIR)$(mandir)/man1/slogin.old.1   \
X  	 $(DESTDIR)$(mandir)/man1/ssh-agent.old.1 $(DESTDIR)$(mandir)/man1/ssh-keygen.old.1	\
X  	 $(DESTDIR)$(mandir)/man1/scp.old.1 $(DESTDIR)$(mandir)/man1/sftp.old.1             \
X  	 $(DESTDIR)$(mandir)/man8/sshd.old.8
X***************
X*** 650,685 ****
X  	-chmod $(SSH_SIGNER_INSTALL_MODE) $(DESTDIR)$(bindir)/ssh-signer2
X  
X  install-data-hook: make-install-dirs generate-host-key install-symlinks
X! 	-@if test '!' -f $(DESTDIR)$(etcdir)/sshd2_config ; then \
X! 	 echo Installing $(DESTDIR)$(etcdir)/sshd2_config ; \
X! 	 $(INSTALL_DATA) $(srcdir)/sshd2_config \
X!                          $(DESTDIR)$(etcdir)/sshd2_config ; \
X! 	fi
X! 	 echo Updating $(DESTDIR)$(etcdir)/sshd2_config.example ;
X! 	 $(INSTALL_DATA) $(srcdir)/sshd2_config \
X!                          $(DESTDIR)$(etcdir)/sshd2_config.example ;
X! 	-@if test '!' -f $(DESTDIR)$(etcdir)/ssh2_config ; then \
X! 	 echo Installing $(DESTDIR)$(etcdir)/ssh2_config ; \
X! 	 $(INSTALL_DATA) $(srcdir)/ssh2_config \
X!                          $(DESTDIR)$(etcdir)/ssh2_config ; \
X! 	fi
X! 	 echo Updating $(DESTDIR)$(etcdir)/ssh2_config.example ;
X! 	 $(INSTALL_DATA) $(srcdir)/ssh2_config \
X!                          $(DESTDIR)$(etcdir)/ssh2_config.example ;
X! 	 echo Updating $(DESTDIR)$(subconfig_dir)/host_ext.example ;
X! 	 $(INSTALL_DATA) $(srcdir)/subconfig/host_ext.example \
X!                          $(DESTDIR)$(subconfig_dir)/host_ext.example ;
X! 	 echo Updating $(DESTDIR)$(subconfig_dir)/host_int.example ;
X! 	 $(INSTALL_DATA) $(srcdir)/subconfig/host_int.example \
X!                          $(DESTDIR)$(subconfig_dir)/host_int.example ;
X! 	 echo Updating $(DESTDIR)$(subconfig_dir)/anonymous.example ;
X! 	 $(INSTALL_DATA) $(srcdir)/subconfig/anonymous.example \
X!                          $(DESTDIR)$(subconfig_dir)/anonymous.example ;
X! 	 echo Updating $(DESTDIR)$(subconfig_dir)/user.example ;
X! 	 $(INSTALL_DATA) $(srcdir)/subconfig/user.example \
X!                          $(DESTDIR)$(subconfig_dir)/user.example ;
X! 	-@if test '!' -f $(DESTDIR)$(etcdir)/ssh_dummy_shell.out ; then \
X! 	 echo Installing $(DESTDIR)$(etcdir)/ssh_dummy_shell.out ; \
X! 	 $(INSTALL_DATA) $(srcdir)/ssh_dummy_shell.out \
X!                          $(DESTDIR)$(etcdir)/ssh_dummy_shell.out ; \
X! 	fi
X--- 655,664 ----
X  	-chmod $(SSH_SIGNER_INSTALL_MODE) $(DESTDIR)$(bindir)/ssh-signer2
X  
X  install-data-hook: make-install-dirs generate-host-key install-symlinks
X! 	$(INSTALL_DATA) $(srcdir)/sshd2_config $(DESTDIR)$(datadir)/examples/ssh2/sshd2_config
X! 	$(INSTALL_DATA) $(srcdir)/ssh2_config $(DESTDIR)$(datadir)/examples/ssh2/ssh2_config
X! 	$(INSTALL_DATA) $(srcdir)/ssh_dummy_shell.out $(DESTDIR)$(datadir)/examples/ssh2/ssh_dummy_shell.out
X! 	$(INSTALL_DATA) $(srcdir)/subconfig/host_ext.example $(DESTDIR)$(datadir)/examples/ssh2/subconfig/host_ext
X! 	$(INSTALL_DATA) $(srcdir)/subconfig/host_int.example $(DESTDIR)$(datadir)/examples/ssh2/subconfig/host_int
X! 	$(INSTALL_DATA) $(srcdir)/subconfig/anonymous.example $(DESTDIR)$(datadir)/examples/ssh2/subconfig/anonymous
X! 	$(INSTALL_DATA) $(srcdir)/subconfig/user.example $(DESTDIR)$(datadir)/examples/ssh2/subconfig/user
XIndex: configure.in
X===================================================================
XRCS file: /cvs/misc/ssh3/configure.in,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 configure.in
X*** configure.in	26 Jun 2002 19:31:39 -0000	1.1.1.3
X***************
X*** 9,15 ****
X  #
X  
X  AC_INIT(lib/sshutil/sshcore/sshbuffer.c)
X! AC_PREREQ(2.10)
X  
X  # Check that all files in MANIFEST exist (if MANIFEST exists, of course :-)
X  if test -f $srcdir/MANIFEST
X--- 9,15 ----
X  #
X  
X  AC_INIT(lib/sshutil/sshcore/sshbuffer.c)
X! AC_PREREQ(2.52)
X  
X  # Check that all files in MANIFEST exist (if MANIFEST exists, of course :-)
X  if test -f $srcdir/MANIFEST
X***************
X*** 57,79 ****
X    fi
X  fi
X  
X- # Compilation environment requires autoconf to be at least 2.13
X- if test "x$AUTOCONF" = "xautoconf"
X- then
X-   # this should match any 2.2* (2.3* etc..) and 2.1x where x >= 3.
X-   if ($AUTOCONF --version | egrep 'Autoconf version.* [[23456789]]\.([[23456789]]|1[[3456789]])') 2>/dev/null >/dev/null
X-   then
X-   else
X- dnl
X- dnl
X- dnl
X-     AC_MSG_WARN(autoconf is not (at least) version 2.13, not using autoconf)
X-     AUTOCONF="$missing_dir/missing autoconf"
X- dnl
X-   fi
X- fi
X- 
X  # XXX temporarily force no optimization unless explicitly requested to
X  # ease debugging.
X  if test '!' -n "$CFLAGS"; then
X--- 57,62 ----
X***************
X*** 502,508 ****
X  
X  AC_C_CONST
X  AC_C_INLINE
X! AC_SSH_BIGENDIAN
X  
X  if test -z "$no_termios"; then
X    AC_CHECK_HEADERS(termios.h)
X--- 485,491 ----
X  
X  AC_C_CONST
X  AC_C_INLINE
X! AC_C_BIGENDIAN
X  
X  if test -z "$no_termios"; then
X    AC_CHECK_HEADERS(termios.h)
X***************
X*** 839,845 ****
X    AC_CHECK_LIB(socket, socket)
X  fi
X  
X! AC_CHECK_FUNCS(strchr memcpy gethostname gettimeofday ctime signal)
X  AC_CHECK_FUNCS(getservbyname getservbyport endservent)
X  AC_CHECK_FUNCS(popen lockf getrusage uname)
X  AC_CHECK_FUNCS(getpid getppid getuid getgid getpgrp)
X--- 822,828 ----
X    AC_CHECK_LIB(socket, socket)
X  fi
X  
X! AC_CHECK_FUNCS(strchr memcpy gethostname getdomainname gettimeofday ctime signal)
X  AC_CHECK_FUNCS(getservbyname getservbyport endservent)
X  AC_CHECK_FUNCS(popen lockf getrusage uname)
X  AC_CHECK_FUNCS(getpid getppid getuid getgid getpgrp)
X***************
X*** 943,949 ****
X  dnl
X  dnl
X  dnl
X!   LIBOBJS="$LIBOBJS inet_ntoa.o"
X  dnl
X    AC_MSG_WARN("using internal inet_ntoa")
X  fi
X--- 926,932 ----
X  dnl
X  dnl
X  dnl
X!   AC_LIBOBJ([inet_ntoa.o])
X  dnl
X    AC_MSG_WARN("using internal inet_ntoa")
X  fi
X***************
X*** 1595,1601 ****
X  AC_CHECK_LIB(sec, getspnam,,[AC_CHECK_LIB(gen, getspnam)])
X  AC_CHECK_LIB(seq, get_process_stats)
X  
X! AC_CHECK_FUNCS(getspnam daemon setspent)
X  
X  # check for minor
X  AC_CHECK_FUNCS(minor)
X--- 1578,1584 ----
X  AC_CHECK_LIB(sec, getspnam,,[AC_CHECK_LIB(gen, getspnam)])
X  AC_CHECK_LIB(seq, get_process_stats)
X  
X! AC_CHECK_FUNCS(getspnam login_getuserclass login_getuser daemon setspent)
X  
X  # check for minor
X  AC_CHECK_FUNCS(minor)
X***************
X*** 2816,2843 ****
X  
X  # Check ssh1 compatibility
X  
X! MSG_SSH1_FALLBACK_CAPABILITY="yes"
X! AC_PATH_PROG(SSH1_PATH, ssh1, no-ssh1)
X! AC_MSG_CHECKING(for compatible ssh1)
X! if test "$SSH1_PATH" = "no-ssh1"; then
X!   AC_MSG_RESULT(no ssh1 installed- COMPATIBILITY DISABLED)
X!   MSG_SSH1_FALLBACK_CAPABILITY="no"
X  else
X!   AC_MSG_RESULT(yes)
X!   AC_DEFINE(SSH1_COMPATIBILITY)
X!   SSHD1_PATH=`echo $SSH1_PATH | sed 's@/bin/ssh1$@/sbin/sshd1@'`
X!   SCP1_PATH=`echo $SSH1_PATH | sed 's@/bin/ssh1$@/bin/scp1@'`
X!   AC_DEFINE_UNQUOTED(SSH1_PATH, "$SSH1_PATH")
X!   AC_DEFINE_UNQUOTED(SSHD1_PATH, "$SSHD1_PATH")
X!   AC_DEFINE_UNQUOTED(SCP1_PATH, "$SCP1_PATH")
X  fi
X  
X  dnl
X  MSG_SSH1_INTERNAL_EMULATION="yes"
X! AC_MSG_CHECKING(whether to include internal ssh1 compatibility)
X  AC_ARG_WITH(internal-ssh1-compat,
X  [  --without-internal-ssh1-compat
X!                           Leave out internal ssh1 compatibility.],
X  [ case "$withval" in
X    no)
X      AC_MSG_RESULT(no)
X--- 2799,2844 ----
X  
X  # Check ssh1 compatibility
X  
X! SSH1_COMPAT=
X! AC_MSG_CHECKING(whether to enable SSH1 compatability)
X! AC_ARG_WITH(ssh1-compat,
X! [  --with-ssh1-compat      Include ssh1 compatibility. (default if ssh1 installed)
X!   --without-ssh1-compat   Leave out ssh1 compatibility.],
X! [ case "$withval" in
X!   no)
X!     ;;
X!   *)
X!     SSH1_COMPAT="yes"
X!     ;;
X!   esac ],[SSH1_COMPAT="yes"])
X! 
X! if test "X$SSH1_COMPAT" = "Xyes"; then
X!   MSG_SSH1_FALLBACK_CAPABILITY="yes"
X!   AC_PATH_PROG(SSH1_PATH, ssh1, no-ssh1)
X!   AC_MSG_CHECKING(for compatible ssh1)
X!   if test "$SSH1_PATH" = "no-ssh1"; then
X!     AC_MSG_RESULT(no ssh1 installed- COMPATIBILITY DISABLED)
X!     MSG_SSH1_FALLBACK_CAPABILITY="no"
X!   else
X!     AC_MSG_RESULT(yes)
X!     AC_DEFINE(SSH1_COMPATIBILITY)
X!     SSHD1_PATH=`echo $SSH1_PATH | sed 's@/bin/ssh1$@/sbin/sshd1@'`
X!     SCP1_PATH=`echo $SSH1_PATH | sed 's@/bin/ssh1$@/bin/scp1@'`
X!     AC_DEFINE_UNQUOTED(SSH1_PATH, "$SSH1_PATH")
X!     AC_DEFINE_UNQUOTED(SSHD1_PATH, "$SSHD1_PATH")
X!     AC_DEFINE_UNQUOTED(SCP1_PATH, "$SCP1_PATH")
X!   fi
X  else
X!   AC_MSG_RESULT(no)
X!   MSG_SSH1_FALLBACK_CAPABILITY="no"
X  fi
X  
X  dnl
X  MSG_SSH1_INTERNAL_EMULATION="yes"
X! AC_MSG_CHECKING(whether to include internal ssh1 (client-only) compatibility)
X  AC_ARG_WITH(internal-ssh1-compat,
X  [  --without-internal-ssh1-compat
X!                           Leave out internal ssh1 (client-only) compatibility.],
X  [ case "$withval" in
X    no)
X      AC_MSG_RESULT(no)
XIndex: acconfig.h
X===================================================================
XRCS file: /cvs/misc/ssh3/acconfig.h,v
Xretrieving revision 1.1.1.3
Xdiff -c -r1.1.1.3 acconfig.h
X*** acconfig.h	26 Jun 2002 19:31:39 -0000	1.1.1.3
X***************
X*** 452,456 ****
X--- 452,459 ----
X  
X  /* Define this to use the ANSI X9.17 Random Number Generator */
X  #undef WITH_ANSI_RNG
X+ 
X+ #undef _POSIX_SOURCE
X+ 
X  @BOTTOM@
X  #endif /* SSHCONF_H */
END-of-patches/patch-one
exit



-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>