[ike] fix bug that occurs when no pid is given at the command line, already fixed in upstream HEAD
Marcel Wysocki
maci at fedoraproject.org
Fri Apr 26 07:01:35 UTC 2013
commit 4a97bf1edc12ecaac53f26fcbd8dfbe09e209c29
Author: Marcel Wysocki <maci at satgnu.net>
Date: Fri Apr 26 09:01:23 2013 +0200
fix bug that occurs when no pid is given at the command line, already fixed in upstream HEAD
ike.spec | 9 ++++++++-
pid.diff | 26 ++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/ike.spec b/ike.spec
index eb69c3c..f57a245 100644
--- a/ike.spec
+++ b/ike.spec
@@ -1,6 +1,6 @@
Name: ike
Version: 2.2.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Shrew Soft VPN Client For Linux
Group: Applications/Communications
License: Sleepycat
@@ -9,6 +9,8 @@ Source0: http://www.shrew.net/download/%{name}/%{name}-%{version}-release
Source1: iked.service
Source2: ike.desktop
Source3: ike.logrotate
+#already fixed in upstream HEAD
+Patch0: pid.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake flex bison qt4-devel openldap-devel openssl-devel libedit-devel
BuildRequires: desktop-file-utils systemd
@@ -22,6 +24,8 @@ IPSEC VPN servers.
%prep
%setup -q -n %{name}
+%patch0 -p0
+
sed -i 's:/var/log/:/var/log/iked/:' source/iked/iked.conf.sample
sed -i 's/\r//' TODO.TXT
@@ -108,6 +112,9 @@ fi
%dir %{_localstatedir}/log/%{name}d
%changelog
+* Fri Apr 26 2013 Marcel Wysocki <maci at satgnu.net> - 2.2.0-4
+- fix bug that occurs when no pid is given at the command line
+
* Wed Apr 24 2013 root - 2.2.0-3
- fix logrotate script
diff --git a/pid.diff b/pid.diff
new file mode 100644
index 0000000..10d30ea
--- /dev/null
+++ b/pid.diff
@@ -0,0 +1,26 @@
+Index: source/iked/main.cpp
+===================================================================
+--- source/iked/main.cpp (revision 879)
++++ source/iked/main.cpp (working copy)
+@@ -544,8 +544,9 @@
+ // create our pid file
+ //
+
+- if( !daemon_pidfile_create( path_pid ) )
+- return -1;
++ if( path_pid[ 0 ] )
++ if( !daemon_pidfile_create( path_pid ) )
++ return -1;
+
+ //
+ // run daemon main loop
+@@ -557,7 +558,8 @@
+ // remove our pidfile
+ //
+
+- daemon_pidfile_remove( path_pid );
++ if( path_pid[ 0 ] )
++ daemon_pidfile_remove( path_pid );
+
+ #endif
+
More information about the scm-commits
mailing list