Skip to contentSkip to conversation

racoon2: add new recipe

PATCH New [email protected] 1 participant 1 message Jun 16, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 racoon2: add new recipe

From: Yi Zhao <[email protected]>

The Racoon2 project is a joint effort which provides an implementation of key management system for IPsec. It supports IKEv1, IKEv2, and KINK protocols.

---
 .../recipes-cgl/racoon2/racoon2/iked.service       |  14 +
 .../racoon2-Add-Value-to-HAVE_NSSWITCH_CONF.patch  |  32 +++
 .../racoon2/racoon2/racoon2-DESTDIR.patch          | 202 +++++++++++++++
 .../racoon2/racoon2-Remove-INSTALL_OPTS.patch      |  87 +++++++
 .../racoon2/racoon2-configure-autoheader.patch     |  60 +++++
 .../racoon2/racoon2/racoon2-configure-memcmp.patch |  32 +++
 ...oon2-configure.in-remove-redundant-macros.patch | 199 +++++++++++++++
 .../racoon2-correct-openssl-include-path.patch     |  70 +++++
 .../racoon2/racoon2-disable-hard-limit-timer.patch |  80 ++++++
 .../racoon2/racoon2-fix-configure-error.patch      |  50 ++++
 .../racoon2/racoon2-fix-hardcoded-sysconfdir.patch | 281 +++++++++++++++++++++
 .../racoon2/racoon2-fix-rekeying-reply.patch       |  28 ++
 .../racoon2-fix-sadb_msg_seq-collision.patch       |  41 +++
 ...oon2-fix-target-perl-path-to-generate-RPM.patch |  86 +++++++
 .../racoon2/racoon2-fwrite-return-value.patch      |  34 +++
 .../racoon2/racoon2/racoon2-iked-initscript.patch  |  40 +++
 .../racoon2/racoon2-iked-needs-libcrypto.patch     |  34 +++
 .../racoon2/racoon2/racoon2-kinkd-initscript.patch |  40 +++
 .../racoon2/racoon2-reenable-the-ipv6-check.patch  |  65 +++++
 .../racoon2-remove-deprecated-do-clause.patch      |  19 ++
 .../racoon2-removed-conflicting-prototypes.patch   |  51 ++++
 .../racoon2/racoon2/racoon2-spmd-initscript.patch  |  39 +++
 .../recipes-cgl/racoon2/racoon2/spmd.service       |  12 +
 .../racoon2/racoon2/volatiles.99_racoon2           |   1 +
 .../recipes-cgl/racoon2/racoon2_20100526a.bb       | 104 ++++++++
 25 files changed, 1701 insertions(+)
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/iked.service
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-Add-Value-to-HAVE_NSSWITCH_CONF.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-DESTDIR.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-Remove-INSTALL_OPTS.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-configure-autoheader.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-configure-memcmp.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-configure.in-remove-redundant-macros.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-correct-openssl-include-path.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-disable-hard-limit-timer.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-configure-error.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-hardcoded-sysconfdir.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-rekeying-reply.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-sadb_msg_seq-collision.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-target-perl-path-to-generate-RPM.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fwrite-return-value.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-iked-initscript.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-iked-needs-libcrypto.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-kinkd-initscript.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-reenable-the-ipv6-check.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-remove-deprecated-do-clause.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-removed-conflicting-prototypes.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-spmd-initscript.patch
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/spmd.service
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2/volatiles.99_racoon2
 create mode 100644 meta-cgl-common/recipes-cgl/racoon2/racoon2_20100526a.bb
meta-cgl-common/recipes-cgl/racoon2/racoon2/iked.service new file +14 -0
new file mode 100644
index 0000000..3ec4f96
@@ -0,0 +1,14 @@
+[Unit]
+Description=daemon for the Internet Key Exchange
+After=syslog.target network.target spmd.service
+Requires=spmd.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/iked.pid
+ExecStart=@SBINDIR@/iked
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+SuccessExitStatus=1
+
+[Install]
+WantedBy=multi-user.target
meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-Add-Value-to-HAVE_NSSWITCH_CONF.patch new file +32 -0
new file mode 100644
index 0000000..9ca88a8
@@ -0,0 +1,32 @@
+From 2ad8c9b2e99be296fc7c7bf94161a53aa3984b24 Mon Sep 17 00:00:00 2001
+From: Aws Ismail <[email protected]>
+Date: Tue, 23 Oct 2012 18:07:23 -0400
+Subject: [PATCH 2/3] Add Value to HAVE_NSSWITCH_CONF
+
+Use a more verbose form of AC_DEFINE
+to force value of "1" to
+HAVE_NSSWITCH_CONF macro.
+
+Upstream-Status: Pending
+
+Signed-off-by: Aws Ismail <[email protected]>
+---
+ spmd/configure.in |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/spmd/configure.in b/spmd/configure.in
+index c149c2d..c079c56 100644
+--- a/spmd/configure.in
++++ b/spmd/configure.in
+@@ -91,7 +91,7 @@ case "$target" in
+ 		;;
+ 	*)      
+ 		AC_MSG_RESULT(use /etc/nsswitch.conf)
+-		AC_DEFINE(HAVE_NSSWITCH_CONF)
++		AC_DEFINE(HAVE_NSSWITCH_CONF, [1], [Define if nsswitch conf file exists])
+ 		;;
+ esac
+ 
+-- 
+1.7.0.4
+
meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-DESTDIR.patch new file +202 -0

202 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-Remove-INSTALL_OPTS.patch new file +87 -0

87 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-configure-autoheader.patch new file +60 -0

60 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-configure-memcmp.patch new file +32 -0
new file mode 100644
index 0000000..97857c7
@@ -0,0 +1,32 @@
+Comment out memmcp.clean configure-related option
+ 
+Upstream-Status: Pending
+
+Signed-off-by: Aws Ismail <[email protected]>
+
+diff --git a/iked/configure b/iked/configure
+index 80ca9a3..9205bc3 100755
+--- a/iked/configure
++++ b/iked/configure
+@@ -1758,7 +1758,7 @@ fi
+ fi
+ 
+ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
+-test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
++# test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
+ 
+ echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+ echo "configure:1765: checking return type of signal handlers" >&5
+diff --git a/lib/configure b/lib/configure
+index c7d057a..6390794 100755
+--- a/lib/configure
++++ b/lib/configure
+@@ -1909,7 +1909,7 @@ fi
+ fi
+ 
+ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
+-test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
++# test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
+ 
+ echo $ac_n "checking for strftime""... $ac_c" 1>&6
+ echo "configure:1916: checking for strftime" >&5
meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-configure.in-remove-redundant-macros.patch new file +199 -0

199 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-correct-openssl-include-path.patch new file +70 -0

70 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-disable-hard-limit-timer.patch new file +80 -0

80 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-configure-error.patch new file +50 -0

50 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-hardcoded-sysconfdir.patch new file +281 -0

281 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-rekeying-reply.patch new file +28 -0
new file mode 100644
index 0000000..515241d
@@ -0,0 +1,28 @@
+racoon2: fix rekeying reply
+
+Why did node_a send the CREATE_CHILD_SA having the duplicated id?
+racoon2 has a counter for counting the number of transmitted request messages.
+You can find the counter named request_pending in the source code.
+This counter is counted up when a request message is sent,
+and it is counted down when the corresponding response message arrives.
+The problem is that racoon2 does not count up the counter mistakenly
+when sending the initial IKE_SA_INIT message in initiator mode.
+This makes the counter corrupt
+then the CREATE_CHILD_SA sent with an unexpected message id.
+
+Upstream-Status: Pending
+
+Signed-off-by: LiWang <[email protected]>
+Signed-of-by: Aws Ismail <[email protected]>
+
+--- racoon2-20090327c.org/iked/ikev2.c	2010-05-14 10:19:34.000000000 +0800
++++ racoon2-20090327c/iked/ikev2.c	2010-05-14 10:23:54.000000000 +0800
+@@ -923,6 +923,8 @@
+ 	if (!pkt)
+ 		goto fail;
+ 
++	++ike_sa->request_pending;
++
+ 	/* save message data for AUTH calculation */
+ 	if (ike_sa->my_first_message)
+ 		rc_vfree(ike_sa->my_first_message);
meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-sadb_msg_seq-collision.patch new file +41 -0

41 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fix-target-perl-path-to-generate-RPM.patch new file +86 -0

86 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-fwrite-return-value.patch new file +34 -0
new file mode 100644
index 0000000..a013199
@@ -0,0 +1,34 @@
+racoon2: fix compile error for MIPS
+
+Correct compile error with fortify-source.
+When compiling with FORTIFY_SOURCE specified,
+the racoon2 package fails.  The root cause is a 
+macro introduces a call to fwrite() where the return code
+isn't checked.  This patch moves the macro to an earlier
+spot where this problem is corrected.
+
+Upstream-Status: Pending
+
+Signed-off-by: Greg Moffatt <[email protected]>
+Signed-of-by: Aws Ismail <[email protected]>
+
+---
+ cftoken.l |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/lib/cftoken.l
++++ b/lib/cftoken.l
+@@ -84,6 +84,13 @@
+ #define DP
+ #endif
+ 
++#ifndef ECHO
++/* This used to be an fputs(), but since the string might contain NUL's,
++ * we now use fwrite().
++ */
++#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
++#endif
++
+ 	/* the include files stack */
+ #define CF_INCLUDE_DEPTH 10
+ static struct rcf_include_stack {
meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-iked-initscript.patch new file +40 -0
new file mode 100644
index 0000000..10182f3
@@ -0,0 +1,40 @@
+Source /etc/init.d/functions and add sub-command status
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <[email protected]>
+
+diff --git a/samples/init.d-iked.in b/samples/init.d-iked.in
+index 4e65b94..ff5f355 100644
+--- a/samples/init.d-iked.in
++++ b/samples/init.d-iked.in
+@@ -3,6 +3,9 @@
+ # iked startup script
+ #
+ 
++# Source function library.
++. /etc/init.d/functions
++
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ 
+@@ -25,6 +28,10 @@ stop)
+ 	read pid junk < $PIDFILE && kill $pid
+ 	echo "."
+ 	;;
++  status)
++	status $DAEMON;
++	exit $?
++	;;
+ restart)
+ 	$0 stop
+ 	$0 start
+@@ -35,7 +42,7 @@ reload)
+ 	echo "."
+ 	;;
+ *)
+-	echo "usage: $0 {start|stop|restart|reload}"
++	echo "usage: $0 {start|stop|status|restart|reload}"
+ 	exit 1
+ 	;;
+ esac
meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-iked-needs-libcrypto.patch new file +34 -0
new file mode 100644
index 0000000..0c57c65
@@ -0,0 +1,34 @@
+iked needs libcrypto
+
+Add libcrypto to the list of LIBS for iked to avoid undefined reference
+errors during compilation.
+
+If add libcrypto to the list of LDFLAGS, the result is same as "gcc  -lcrypto
+-o eaytest eaytest.o crypto_openssl.o str2val.o", since the linker searchs an
+archive only once, at the location where it is specified on the command line,
+crypto_openssl.o will report undefined symbol which is defined in libcrypto
+
+Upstream-Status: Pending
+
+Signed-off-by: Aws Ismail <[email protected]>
+Signed-off-by: Roy.Li <[email protected]> 
+---
+ iked/Makefile.in |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/iked/Makefile.in b/iked/Makefile.in
+index 57134f3..5a9160c 100644
+--- a/iked/Makefile.in
++++ b/iked/Makefile.in
+@@ -56,7 +56,7 @@ OBJS += @CRYPTOBJS@
+ TESTSRC = eaytest.c
+ TESTOBJ = $(TESTSRC:%.c=%.o)
+ 
+-LIBS = @LIBS@
++LIBS = @LIBS@ -lcrypto
+ LIBRARIES = @LIBRARIES@
+ 
+ MAN = iked.8
+-- 
+1.7.1
+
meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-kinkd-initscript.patch new file +40 -0
new file mode 100644
index 0000000..69fe02d
@@ -0,0 +1,40 @@
+Source /etc/init.d/functions and add sub-command status
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <[email protected]>
+
+diff --git a/samples/init.d-kinkd.in b/samples/init.d-kinkd.in
+index 1813b39..71d0855 100644
+--- a/samples/init.d-kinkd.in
++++ b/samples/init.d-kinkd.in
+@@ -3,6 +3,9 @@
+ # kinkd start up script
+ #
+ 
++# Source function library.
++. /etc/init.d/functions
++
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ 
+@@ -25,6 +28,10 @@ stop)
+ 	read pid junk < $PIDFILE && kill $pid
+ 	echo "."
+ 	;;
++  status)
++	status $DAEMON;
++	exit $?
++	;;
+ restart)
+ 	$0 stop
+ 	$0 start
+@@ -35,7 +42,7 @@ reload)
+ 	echo "."
+ 	;;
+ *)
+-	echo "usage: $0 {start|stop|restart|reload}"
++	echo "usage: $0 {start|stop|status|restart|reload}"
+ 	exit 1
+ 	;;
+ esac
meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-reenable-the-ipv6-check.patch new file +65 -0

65 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-remove-deprecated-do-clause.patch new file +19 -0
new file mode 100644
index 0000000..7718235
@@ -0,0 +1,19 @@
+Remove deprecated do clause which is not supported by perl 5 any more.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <[email protected]>
+
+--- racoon2-20100526a/pskgen/pskgen.in.orig	2014-01-27 16:19:19.028054860 +0800
++++ racoon2-20100526a/pskgen/pskgen.in	2014-01-27 16:19:47.707748768 +0800
+@@ -59,8 +59,8 @@
+ 	exit 0;
+ }
+ 
+-require 'getopts.pl';
+-do Getopts('rs:o:di:he:d');
++use Getopt::Std;
++getopts('rs:o:di:he:d');
+ $output = '-';
+ $output = $opt_o if ($opt_o);
+ 
meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-removed-conflicting-prototypes.patch new file +51 -0

51 lines not on this page · raw message

meta-cgl-common/recipes-cgl/racoon2/racoon2/racoon2-spmd-initscript.patch new file +39 -0
new file mode 100644
index 0000000..ab2b0e0
@@ -0,0 +1,39 @@
+Source /etc/init.d/functions and add sub-command status
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <[email protected]>
+
+diff --git a/samples/init.d-spmd.in b/samples/init.d-spmd.in
+index d38b825..624f22d 100644
+--- a/samples/init.d-spmd.in
++++ b/samples/init.d-spmd.in
+@@ -1,5 +1,8 @@
+ #! /bin/sh
+ 
++# Source function library.
++. /etc/init.d/functions
++
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ 
+@@ -27,6 +30,10 @@ case "$1" in
+ 	$DAEMON -k
+ 	echo "."
+ 	;;
++  status)
++	status $DAEMON;
++	exit $?
++	;;
+   restart|force-reload)
+   	$0 stop
+ 	$0 start
+@@ -34,7 +41,7 @@ case "$1" in
+   *)
+ 	N=/etc/init.d/$NAME
+ 	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+-	echo "Usage: $N {start|stop|restart|force-reload}" >&2
++	echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
+ 	exit 1
+ 	;;
+ esac
meta-cgl-common/recipes-cgl/racoon2/racoon2/spmd.service new file +12 -0
new file mode 100644
index 0000000..22e7acb
@@ -0,0 +1,12 @@
+[Unit]
+Description=Manages IPsec Security Policy for racoon2
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/spmd.pid
+ExecStart=@SBINDIR@/spmd
+ExecStop=@SBINDIR@/spmd -k
+
+[Install]
+WantedBy=multi-user.target
meta-cgl-common/recipes-cgl/racoon2/racoon2/volatiles.99_racoon2 new file +1 -0
new file mode 100644
index 0000000..8c82176
@@ -0,0 +1 @@
+d root root 0700 /var/run/racoon2 none
meta-cgl-common/recipes-cgl/racoon2/racoon2_20100526a.bb new file +104 -0

104 lines not on this page · raw message

Signature · 1 line
2.7.4