SHA256
1
0
forked from pool/strongswan
OBS User unknown 2008-05-22 02:41:53 +00:00 committed by Git OBS Bridge
parent ece66d5641
commit 0bd5d2a61e
3 changed files with 33 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon May 19 16:17:16 CEST 2008 - mt@suse.de
- Applied fix (strongswan_crash_badcfg_reload.dif) to avoid
a crash after reloading with bad config (bnc#392062).
-------------------------------------------------------------------
Wed Apr 23 14:28:41 CEST 2008 - mt@suse.de

View File

@ -15,7 +15,7 @@ Name: strongswan
%define upstream_version 4.2.1
%define strongswan_docdir %{_docdir}/%{name}
Version: 4.2.1
Release: 1
Release: 8
License: GPL v2 or later
Group: Productivity/Networking/Security
Summary: StrongSwan -- OpenSource IPsec-based VPN Solution
@ -32,6 +32,7 @@ Source2: %{name}.init.in
Source3: %{name}-%{version}-rpmlintrc
Patch1: %{name}_modprobe_syslog.dif
Patch2: %{name}-%{upstream_version}.dif
Patch3: %{name}_crash_badcfg_reload.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: bison flex gmp-devel gperf pkg-config
%if 0%{?suse_version} >= 1030
@ -128,6 +129,7 @@ Authors:
%setup -q -n %{name}-%{upstream_version}
%patch1 -p0
%patch2 -p0
%patch3 -p0
sed -e 's|@libexecdir@|%_libexecdir|g' \
< $RPM_SOURCE_DIR/strongswan.init.in \
> strongswan.init
@ -258,6 +260,9 @@ fi
%{_mandir}/man8/starter.8*
%changelog
* Mon May 19 2008 mt@suse.de
- Applied fix (strongswan_crash_badcfg_reload.dif) to avoid
a crash after reloading with bad config (bnc#392062).
* Wed Apr 23 2008 mt@suse.de
- Updated to 4.2.1 release. A lot of code refactoring in the 4.2
release provides much more modularity and therefore much more

View File

@ -0,0 +1,21 @@
--- src/starter/starter.c
+++ src/starter/starter.c 2008/05/20 08:42:39
@@ -390,7 +390,7 @@
);
new_cfg = confread_load(CONFIG_FILE);
- if (new_cfg->err + new_cfg->non_fatal_err == 0)
+ if (new_cfg && new_cfg->err + new_cfg->non_fatal_err == 0)
{
/* Switch to new config. New conn will be loaded below */
if (!starter_cmp_defaultroute(&new_cfg->defaultroute
@@ -484,7 +484,8 @@
else
{
plog("can't reload config file due to errors -- keeping old one");
- confread_free(new_cfg);
+ if(new_cfg)
+ confread_free(new_cfg);
}
_action_ &= ~FLAG_ACTION_UPDATE;
last_reload = time(NULL);