pkgsrc/security/ssh/patches/patch-ac
2003-01-04 11:51:29 +00:00

202 lines
9 KiB
Text

$NetBSD: patch-ac,v 1.14 2003/01/04 11:51:30 cjep Exp $
--- Makefile.in.orig Wed May 12 12:19:31 1999
+++ Makefile.in
@@ -264,7 +264,7 @@ CC = @CC@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
DEFS = @DEFS@ $(COMMERCIAL)
-LIBS = @LIBS@
+LIBS = @LIBS@ @HESIOD_LIBS@
LIBOBJS = @LIBOBJS@
CONFOBJS = @CONFOBJS@
SSHCONFOBJS = @SSHCONFOBJS@
@@ -285,6 +285,9 @@ KERBEROS_INCS = @KERBEROS_INCS@
KERBEROS_LIBS = @KERBEROS_LIBS@
KERBEROS_OBJS = @KERBEROS_OBJS@
+HESIOD_ROOT = @HESIOD_ROOT@
+HESIOD_INCS = @HESIOD_INCS@
+
RSAREFDEP = @RSAREFDEP@
WRAPLIBS = @WRAPLIBS@
@@ -304,7 +307,8 @@ GMPDIR = gmp-2.0.2-ssh-2
GMPLIBS = -L$(GMPDIR) -lgmp
GMPDEP = $(GMPDIR)/gmp.h $(GMPDIR)/libgmp.a
-ZLIBDIR = zlib-1.0.4
+#ZLIBDIR = zlib-1.0.4
+ZLIBDIR = /usr/lib
ZLIBDEP = $(ZLIBDIR)/libz.a
ZLIBLIBS = -L$(ZLIBDIR) -lz
@@ -314,7 +318,7 @@ RSAREFSRCDIR = $(RSAREFDIR)/source
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
-X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@ -Wl,$(_OPSYS_RPATH_NAME)$(X11BASE)/lib
XLIBS = $(X_LIBS) $(X_PRE_LIBS) -lX11 $(X_EXTRA_LIBS) $(LIBS)
@@ -322,7 +326,7 @@ COMMON_OBJS = $(LIBOBJS) $(CONFOBJS) \
rsa.o randoms.o md5.o buffer.o emulate.o packet.o compress.o \
xmalloc.o ttymodes.o newchannels.o bufaux.o authfd.o authfile.o \
crc32.o rsaglue.o cipher.o des.o match.o arcfour.o mpaux.o \
- userfile.o signals.o blowfish.o deattack.o
+ userfile.o signals.o blowfish.o deattack.o radix.o
SSHD_OBJS = sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o \
log-server.o login.o hostfile.o canohost.o servconf.o tildexpand.o \
serverloop.o $(COMMON_OBJS) $(KERBEROS_OBJS) $(SSHDCONFOBJS)
@@ -411,7 +415,7 @@ rfc-pg: rfc-pg.o
$(CC) -o rfc-pg rfc-pg.o
.c.o:
- $(CC) -c -I. $(KERBEROS_INCS) -I$(srcdir)/$(GMPDIR) -I$(srcdir)/$(ZLIBDIR) $(DEFS) -DHOST_KEY_FILE=\"$(HOST_KEY_FILE)\" -DHOST_CONFIG_FILE=\"$(HOST_CONFIG_FILE)\" -DSERVER_CONFIG_FILE=\"$(SERVER_CONFIG_FILE)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DETCDIR=\"$(etcdir)\" -DPIDDIR=\"$(piddir)\" -DSSH_BINDIR=\"$(bindir)\" -DTIS_MAP_FILE=\"$(TIS_MAP_FILE)\" $(CFLAGS) $(X_CFLAGS) $<
+ $(CC) -c -I. $(KERBEROS_INCS) $(HESIOD_INCS) -I$(srcdir)/$(GMPDIR) -I$(srcdir)/$(ZLIBDIR) $(DEFS) -DHOST_KEY_FILE=\"$(HOST_KEY_FILE)\" -DHOST_CONFIG_FILE=\"$(HOST_CONFIG_FILE)\" -DSERVER_CONFIG_FILE=\"$(SERVER_CONFIG_FILE)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DETCDIR=\"$(etcdir)\" -DPIDDIR=\"$(piddir)\" -DSSH_BINDIR=\"$(bindir)\" -DTIS_MAP_FILE=\"$(TIS_MAP_FILE)\" $(CFLAGS) $(X_CFLAGS) $<
sshd: $(SSHD_OBJS) $(GMPDEP) $(RSAREFDEP) $(ZLIBDEP)
-rm -f sshd
@@ -459,14 +463,14 @@ GMP_COPY_SOURCES = mpz_gcd.c mpz_powm.c
$(GMPDIR)/libgmp.a:
cd $(GMPDIR); $(MAKE)
-$(ZLIBDEP):
- -if test '!' -d $(ZLIBDIR); then \
- mkdir $(ZLIBDIR); \
- cp $(srcdir)/$(ZLIBDIR)/Makefile $(ZLIBDIR); \
- fi
- cd $(ZLIBDIR); $(MAKE) VPATH=$(srcdir)/$(ZLIBDIR):../$(srcdir)/$(ZLIBDIR) \
- CC="$(CC)" CFLAGS="$(CFLAGS) -I. -I$(srcdir)/$(ZLIBDIR) \
- -I../$(srcdir)/$(GMPDIR)" RANLIB="$(RANLIB)" libz.a
+#$(ZLIBDEP):
+# -if test '!' -d $(ZLIBDIR); then \
+# mkdir $(ZLIBDIR); \
+# cp $(srcdir)/$(ZLIBDIR)/Makefile $(ZLIBDIR); \
+# fi
+# cd $(ZLIBDIR); $(MAKE) VPATH=$(srcdir)/$(ZLIBDIR):../$(srcdir)/$(ZLIBDIR) \
+# CC="$(CC)" CFLAGS="$(CFLAGS) -I. -I$(srcdir)/$(ZLIBDIR) \
+# -I../$(srcdir)/$(GMPDIR)" RANLIB="$(RANLIB)" libz.a
$(RSAREFSRCDIR)/librsaref.a:
-if test '!' -d $(RSAREFDIR); then \
@@ -523,10 +527,10 @@ hostinstall: $(PROGRAMS) make-dirs gener
# (otherwise it can only log in as the user it runs as, and must be
# bound to a non-privileged port). Also, password authentication may
# not be available if non-root and using shadow passwords.
-install: $(PROGRAMS) make-dirs generate-host-key install-configs
+install: $(PROGRAMS) make-dirs install-configs
-rm -f $(install_prefix)$(bindir)/ssh1.old
- -chmod 755 $(install_prefix)$(bindir)/ssh1
- -chmod 755 $(install_prefix)$(bindir)/ssh
+ -chmod 555 $(install_prefix)$(bindir)/ssh1
+ -chmod 555 $(install_prefix)$(bindir)/ssh
-mv $(install_prefix)$(bindir)/ssh1 $(install_prefix)$(bindir)/ssh1.old
$(INSTALL_PROGRAM) -o root -m $(SSH_INSTALL_MODE) ssh $(install_prefix)$(bindir)/ssh1
-if test -f $(install_prefix)$(bindir)/ssh2; then \
@@ -549,7 +553,7 @@ install: $(PROGRAMS) make-dirs generate-
-for p in $(NORMAL_PROGRAMS) $(X_PROGRAMS) $(OTHER_PROGRAMS); do \
rm -f $(install_prefix)$(bindir)/$${p}1.old ; \
mv $(install_prefix)$(bindir)/$${p}1 $(install_prefix)$(bindir)/$${p}1.old; \
- $(INSTALL_PROGRAM) -m 0755 $$p $(install_prefix)$(bindir)/$${p}1; \
+ $(INSTALL_PROGRAM) $$p $(install_prefix)$(bindir)/$${p}1; \
if test -f $(install_prefix)$(bindir)/$${p}2; then \
echo "Ssh version 2 $$p utility found, installation doesn't touch $$p link"; \
else \
@@ -566,7 +570,7 @@ install: $(PROGRAMS) make-dirs generate-
rm -f $(install_prefix)$(bindir)/$${p}1.old ; \
mv $(install_prefix)$(bindir)/$${p}1 $(install_prefix)$(bindir)/$${p}1.old; \
$(INSTALL_DATA) $$p $(install_prefix)$(bindir)/$${p}1; \
- chmod 755 $(install_prefix)$(bindir)/$${p}1; \
+ chmod 555 $(install_prefix)$(bindir)/$${p}1; \
if test -f $(install_prefix)$(bindir)/$${p}2; then \
echo "Ssh version 2 $$p utility found, installation doesn't touch $$p link"; \
else \
@@ -582,7 +586,7 @@ install: $(PROGRAMS) make-dirs generate-
-for p in $(SBIN_PROGRAMS); do \
rm -f $(install_prefix)$(sbindir)/$${p}1.old ; \
mv $(install_prefix)$(sbindir)/$${p}1 $(install_prefix)$(sbindir)/$${p}1.old; \
- $(INSTALL_PROGRAM) -m 0755 $$p $(install_prefix)$(sbindir)/$${p}1; \
+ $(INSTALL_PROGRAM) $$p $(install_prefix)$(sbindir)/$${p}1; \
if test -f $(install_prefix)$(sbindir)/$${p}2; then \
echo "Ssh version 2 $$p utility found, installation doesn't touch $$p link"; \
else \
@@ -596,7 +600,7 @@ install: $(PROGRAMS) make-dirs generate-
$(install_prefix)$(sbindir)/`echo $$p | sed '$(transform)'`; fi;\
done
-for p in $(MAN1PAGES); do \
- $(INSTALL_DATA) -m 0644 $(srcdir)/$$p.1 $(install_prefix)$(man1dir)/$${p}1.1 ; \
+ $(INSTALL_DATA) $(srcdir)/$$p.1 $(install_prefix)$(man1dir)/$${p}1.1 ; \
rm -f $(install_prefix)$(man1dir)/$$p.1 ;\
$(LN_S) $${p}1.1 $(install_prefix)$(man1dir)/$$p.1 ;\
if test "`echo $$p | sed '$(transform)'`" '!=' $$p; then \
@@ -615,7 +619,7 @@ install: $(PROGRAMS) make-dirs generate-
$(install_prefix)$(man1dir)/`echo slogin.1 | sed '$(transform)'`; \
fi
-for p in $(MAN1GENERATED); do \
- $(INSTALL_DATA) -m 0644 $$p.1 $(install_prefix)$(man1dir)/$${p}1.1 ; \
+ $(INSTALL_DATA) $$p.1 $(install_prefix)$(man1dir)/$${p}1.1 ; \
rm -f $(install_prefix)$(man1dir)/$$p.1 ; \
$(LN_S) $${p}1.1 $(install_prefix)$(man1dir)/$$p.1 ; \
if test "`echo $$p | sed '$(transform)'`" '!=' $$p; then \
@@ -625,7 +629,7 @@ install: $(PROGRAMS) make-dirs generate-
fi; \
done
-for p in $(MAN8GENERATED); do \
- $(INSTALL_DATA) -m 0644 $$p.8 $(install_prefix)$(man8dir)/$${p}1.8; \
+ $(INSTALL_DATA) $$p.8 $(install_prefix)$(man8dir)/$${p}1.8; \
rm -f $(install_prefix)$(man8dir)/$$p.8 ; \
$(LN_S) $${p}1.8 $(install_prefix)$(man8dir)/$$p.8 ; \
if test "`echo $$p | sed '$(transform)'`" '!=' $$p; then \
@@ -636,12 +640,12 @@ install: $(PROGRAMS) make-dirs generate-
install-configs:
-if test '!' -f $(install_prefix)$(HOST_CONFIG_FILE); then \
- $(INSTALL_DATA) -m 0644 $(srcdir)/host_config.sample \
+ $(INSTALL_DATA) $(srcdir)/host_config.sample \
$(install_prefix)$(HOST_CONFIG_FILE); fi
-if test '!' -f $(install_prefix)$(SERVER_CONFIG_FILE); then \
cat $(srcdir)/server_config.sample | \
sed "s#_ETCDIR_#$(etcdir)#g" >/tmp/ssh_inst.$$$$; \
- $(INSTALL_DATA) -m 0644 /tmp/ssh_inst.$$$$ \
+ $(INSTALL_DATA) /tmp/ssh_inst.$$$$ \
$(install_prefix)$(SERVER_CONFIG_FILE); \
rm -f /tmp/ssh_inst.$$$$; fi
@@ -681,13 +685,13 @@ clean:
-rm -f *.o gmon.out *core $(PROGRAMS) rfc-pg
cd $(GMPDIR); $(MAKE) clean
# cd $(RSAREFSRCDIR); rm -f *.o *.a
- cd $(ZLIBDIR); $(MAKE) clean
+# cd $(ZLIBDIR); $(MAKE) clean
distclean: clean
-rm -f Makefile config.status config.cache config.log config.h
-rm -f ssh.1 sshd.8 make-ssh-known-hosts.1
cd $(GMPDIR); $(MAKE) distclean
- cd $(ZLIBDIR); $(MAKE) distclean
+# cd $(ZLIBDIR); $(MAKE) distclean
dist: dist-free
@@ -720,8 +724,8 @@ dist-make-dir:
gzip -cd $(GMPDIR)/$(GMPDIR).tar.gz | (cd $(DISTNAME); tar pxf - )
# tar cf - $(RSAREFDIR) | (cd $(DISTNAME); tar xf -)
# cd $(DISTNAME)/$(RSAREFSRCDIR); rm -f *.o *.a
- (cd $(srcdir); tar pcf - $(ZLIBDIR) )| (cd $(DISTNAME); tar pxf -)
- cd $(DISTNAME)/$(ZLIBDIR); rm -f *.o *.a; rm -rf CVS
+# (cd $(srcdir); tar pcf - $(ZLIBDIR) )| (cd $(DISTNAME); tar pxf -)
+# cd $(DISTNAME)/$(ZLIBDIR); rm -f *.o *.a; rm -rf CVS
#ifdef F_SECURE_COMMERCIAL
#
@@ -749,7 +753,7 @@ dist-increment-version:
(echo "s/\.$$old_version\"/.$$new_version\"/g"; echo w; echo q) | ed $(srcdir)/version.h >/dev/null
depend:
- $(MAKEDEP) -I$(srcdir) -I. -I$(GMPDIR) -I$(ZLIBDIR) $(DEFS) $(SRCS)
+ $(MAKEDEP) -I$(srcdir) -I. $(DEFS) $(SRCS)
tags:
-rm -f TAGS