diff options
author | Mark Felder <feld@FreeBSD.org> | 2015-04-16 12:55:38 +0000 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2015-04-16 12:55:38 +0000 |
commit | d8fe21535fab053ed7869a995fc9f6c030becb46 (patch) | |
tree | bb2b1e66c2a50fc76fb20e654556c27da4442770 /security/strongswan | |
parent | fead3c7ecff1d827cbc85fd5a8816064aec754f7 (diff) |
Add patches to fix Strongswan Management Protocol
SMP is an XML control interface for Strongswan used by pfSense and
Opnsense. SMP has been deprecated by upstream since 5.2.0 in favor of a
newer IPC mechanism called VICI. As a result upstream is not motivated
to take patches for SMP, and this uses non-portable strlcpy anyway.
The code has not been deleted from the project and if we can bludgeon it
into a working state I see no harm.
PR: 199442
Notes
Notes:
svn path=/head/; revision=384108
Diffstat (limited to 'security/strongswan')
-rw-r--r-- | security/strongswan/Makefile | 1 | ||||
-rw-r--r-- | security/strongswan/files/patch-conf_Makefile.in (renamed from security/strongswan/files/patch-conf__Makefile.in) | 4 | ||||
-rw-r--r-- | security/strongswan/files/patch-src_libcharon_plugins_smp_smp.c | 23 | ||||
-rw-r--r-- | security/strongswan/files/patch-src_starter_Makefile.in (renamed from security/strongswan/files/patch-src__starter__Makefile.in) | 6 |
4 files changed, 29 insertions, 5 deletions
diff --git a/security/strongswan/Makefile b/security/strongswan/Makefile index f4b31c2a0150..600ed7f6116b 100644 --- a/security/strongswan/Makefile +++ b/security/strongswan/Makefile @@ -3,6 +3,7 @@ PORTNAME= strongswan PORTVERSION= 5.3.0 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://download.strongswan.org/ \ http://download2.strongswan.org/ diff --git a/security/strongswan/files/patch-conf__Makefile.in b/security/strongswan/files/patch-conf_Makefile.in index 085193710bee..19c9cb0e1035 100644 --- a/security/strongswan/files/patch-conf__Makefile.in +++ b/security/strongswan/files/patch-conf_Makefile.in @@ -1,6 +1,6 @@ ---- conf/Makefile.in.orig 2014-10-18 08:23:39 UTC +--- conf/Makefile.in.orig 2015-03-27 20:02:47 UTC +++ conf/Makefile.in -@@ -852,15 +852,15 @@ +@@ -860,15 +860,15 @@ install-data-local: $(plugins_install_sr test -e "$(DESTDIR)${strongswanconfdir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanconfdir)" || true test -e "$(DESTDIR)${strongswanddir}" || $(INSTALL) -d "$(DESTDIR)$(strongswanddir)" || true test -e "$(DESTDIR)${charonconfdir}" || $(INSTALL) -d "$(DESTDIR)$(charonconfdir)" || true diff --git a/security/strongswan/files/patch-src_libcharon_plugins_smp_smp.c b/security/strongswan/files/patch-src_libcharon_plugins_smp_smp.c new file mode 100644 index 000000000000..58d9ecd3e3af --- /dev/null +++ b/security/strongswan/files/patch-src_libcharon_plugins_smp_smp.c @@ -0,0 +1,23 @@ +--- src/libcharon/plugins/smp/smp.c.orig 2013-11-01 10:40:35 UTC ++++ src/libcharon/plugins/smp/smp.c +@@ -737,7 +737,7 @@ METHOD(plugin_t, destroy, void, + */ + plugin_t *smp_plugin_create() + { +- struct sockaddr_un unix_addr = { AF_UNIX, IPSEC_PIDDIR "/charon.xml"}; ++ struct sockaddr_un unix_addr; + private_smp_t *this; + mode_t old; + +@@ -766,6 +766,11 @@ plugin_t *smp_plugin_create() + return NULL; + } + ++ strlcpy(unix_addr.sun_path, IPSEC_PIDDIR "/charon.xml", ++ sizeof(unix_addr.sun_path)); ++ unix_addr.sun_len = sizeof(unix_addr); ++ unix_addr.sun_family = PF_LOCAL; ++ + unlink(unix_addr.sun_path); + old = umask(S_IRWXO); + if (bind(this->socket, (struct sockaddr *)&unix_addr, sizeof(unix_addr)) < 0) diff --git a/security/strongswan/files/patch-src__starter__Makefile.in b/security/strongswan/files/patch-src_starter_Makefile.in index 0817b3d23668..4a3a3b9a3544 100644 --- a/security/strongswan/files/patch-src__starter__Makefile.in +++ b/security/strongswan/files/patch-src_starter_Makefile.in @@ -1,6 +1,6 @@ ---- ./src/starter/Makefile.in.orig 2014-07-08 16:06:21.000000000 +0200 -+++ ./src/starter/Makefile.in 2014-08-19 09:48:46.000000000 +0200 -@@ -972,7 +972,7 @@ +--- src/starter/Makefile.in.orig 2015-03-27 20:03:00 UTC ++++ src/starter/Makefile.in +@@ -985,7 +985,7 @@ install-exec-local : test -e "$(DESTDIR)${sysconfdir}/ipsec.d/crls" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/crls" || true test -e "$(DESTDIR)${sysconfdir}/ipsec.d/reqs" || $(INSTALL) -d "$(DESTDIR)$(sysconfdir)/ipsec.d/reqs" || true test -e "$(DESTDIR)${sysconfdir}/ipsec.d/private" || $(INSTALL) -d -m 750 "$(DESTDIR)$(sysconfdir)/ipsec.d/private" || true |