mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-05 01:55:52 +00:00
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
This commit is contained in:
parent
fead3c7ecf
commit
d8fe21535f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=384108
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= strongswan
|
||||
PORTVERSION= 5.3.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://download.strongswan.org/ \
|
||||
http://download2.strongswan.org/
|
||||
|
@ -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
|
@ -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)
|
@ -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
|
Loading…
Reference in New Issue
Block a user