summaryrefslogtreecommitdiffstats
path: root/net/SSLtelnet/files/patch-aa
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2002-10-19 10:27:25 +0000
committerkris <kris@FreeBSD.org>2002-10-19 10:27:25 +0000
commitf001ab5dfa11f7b7470747ec23ee0c1615769d5c (patch)
tree9c5cc6182920822118be5683c1db9ff0e24d0d71 /net/SSLtelnet/files/patch-aa
parentf34787fcb98a4643ab7cd49d51c6ac31fc4b28ad (diff)
downloadFreeBSD-ports-f001ab5dfa11f7b7470747ec23ee0c1615769d5c.zip
FreeBSD-ports-f001ab5dfa11f7b7470747ec23ee0c1615769d5c.tar.gz
Re-add SSLtelnet, with patch (patch-an) to fix the security vulnerability
described in FreeBSD-SA-01:49.telnetd Submitted by: kondo hiroshi <kondo@ysyslab.co.jp> PR: ports/42676
Diffstat (limited to 'net/SSLtelnet/files/patch-aa')
-rw-r--r--net/SSLtelnet/files/patch-aa64
1 files changed, 64 insertions, 0 deletions
diff --git a/net/SSLtelnet/files/patch-aa b/net/SSLtelnet/files/patch-aa
new file mode 100644
index 0000000..1aac469
--- /dev/null
+++ b/net/SSLtelnet/files/patch-aa
@@ -0,0 +1,64 @@
+--- Makefile.orig Thu Sep 24 17:50:59 1998
++++ Makefile Tue Feb 1 11:11:24 2000
+@@ -47,7 +47,7 @@
+
+ # the location where SSLeay is installed ...
+ # - expect a include and lib directory under here
+-SSLTOP=/usr/local/ssl
++SSLTOP=$(PREFIX)
+
+ INSTALLTOP=$(SSLTOP)
+
+@@ -83,8 +83,8 @@
+ #LDADD=$(sockslib) -ltermcap -lcurses
+
+ # uncomment the next two lines for linux
+-CC = gcc -DLINUX -DTERMIOS $(socksflags)
+-LDADD = $(sockslib) -lbsd -lncurses
++#CC = gcc -DLINUX -DTERMIOS $(socksflags)
++#LDADD = $(sockslib) -lbsd -lncurses
+
+ ##OLD Linux stuff
+ #CC = gcc -DLINUX -DUSE_SHADOW $(socksflags)
+@@ -95,6 +95,11 @@
+ #BSD386
+ #CC = gcc -DBSD386 -DTERMCAP $(socksflags)
+ #LDADD = -ltermcap $(sockslib)
++
++#FreeBSD
++CC += -DTERMCAP $(socksflags)
++LDADD = -L$(OPENSSLLIB) -lssl -lcrypto $(EXTRA_SSL_LIBS) \
++ -ltermcap $(sockslib)
+
+ all:
+ @-mkdir bin 2>/dev/null
+@@ -145,12 +150,11 @@
+ tar: clean
+ (cd ..; tar cf $(TARFILE) $(DIRECTORY); /bin/rm -f $(TARFILE).Z $(TARFILE).gz >/dev/null 2>&1 ; $(COMPRESS) $(TARFILE) )
+
+-install: telnet telnetd /dev/null
+- @-mkdir -p $(INSTALLTOP)/bin 2>/dev/null
++install: telnet telnetd
+ cp bin/telnet $(INSTALLTOP)/bin/telnet
+ chmod 755 $(INSTALLTOP)/bin/telnet
+- cp bin/telnetd $(INSTALLTOP)/bin/telnetd
+- chmod 755 $(INSTALLTOP)/bin/telnetd
++ cp bin/telnetd $(INSTALLTOP)/libexec/telnetd
++ chmod 755 $(INSTALLTOP)/libexec/telnetd
+ @echo "*****************************************************"
+ @echo "* Do not forget to make the certificate for telnetd *"
+ @echo "* either manually or via \"make certificate\" *"
+@@ -158,9 +162,10 @@
+
+ certificate:
+ (\
+- cd $(INSTALLTOP)/certs; \
+- ssleay req -new -x509 -nodes -days 365 -out telnetd.pem -keyout telnetd.pem; \
+- ln -s telnetd.pem `ssleay x509 -noout -hash < telnetd.pem`.0 ;\
+- chmod 600 $(INSTALLTOP)/certs/telnetd.pem; \
++ [ -f $(OPENSSLDIR)/certs/telnetd.pem ] && exit; \
++ cd $(OPENSSLDIR)/certs; \
++ openssl req -new -x509 -nodes -days 365 -out telnetd.pem -keyout telnetd.pem; \
++ ln -s telnetd.pem `openssl x509 -noout -hash < telnetd.pem`.0 ;\
++ chmod 600 $(OPENSSLDIR)/certs/telnetd.pem; \
+ )
OpenPOWER on IntegriCloud