[packages/nagios-nsca] add nsca-2.9-fix_open_missing_arg.patch patch from fedora

glen glen at pld-linux.org
Tue Dec 11 16:29:58 CET 2012


commit e19d2aa830b7e882a7efc184d1c8a2f6502603aa
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Dec 11 17:25:07 2012 +0200

    add nsca-2.9-fix_open_missing_arg.patch patch from fedora

 nagios-nsca.spec                    |  9 ++++++---
 nsca-2.9-fix_open_missing_arg.patch | 11 +++++++++++
 2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/nagios-nsca.spec b/nagios-nsca.spec
index 35cdf70..64a0161 100644
--- a/nagios-nsca.spec
+++ b/nagios-nsca.spec
@@ -9,7 +9,7 @@ Summary:	NSCA daemon for Nagios
 Summary(pl.UTF-8):	Demon NSCA dla Nagiosa
 Name:		nagios-nsca
 Version:	2.9.1
-Release:	1
+Release:	1.4
 License:	GPL v2+
 Group:		Networking
 Source0:	http://downloads.sourceforge.net/nagios/nsca-%{version}.tar.gz
@@ -19,11 +19,12 @@ Source2:	%{name}.submit
 Source3:	nsca-command.cfg
 Patch0:		%{name}-groups.patch
 Patch1:		%{name}-config.patch
-URL:		http://www.nagios.org/
+Patch2:		nsca-2.9-fix_open_missing_arg.patch
+URL:		http://exchange.nagios.org/directory/Addons/Passive-Checks/NSCA--2D-Nagios-Service-Check-Acceptor/details
 BuildRequires:	autoconf
 BuildRequires:	libltdl-devel
 %{?with_mcrypt:BuildRequires:	libmcrypt-devel}
-BuildRequires:	rpmbuild(macros) >= 1.268
+BuildRequires:	rpmbuild(macros) >= 1.553
 Requires(post,preun):	/sbin/chkconfig
 Requires:	nagios
 Requires:	rc-scripts
@@ -73,8 +74,10 @@ do centralnej maszyny, na której działa Nagios.
 
 %prep
 %setup -q -n nsca-%{version}
+%undos -f c
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__autoconf}
diff --git a/nsca-2.9-fix_open_missing_arg.patch b/nsca-2.9-fix_open_missing_arg.patch
new file mode 100644
index 0000000..371a5c8
--- /dev/null
+++ b/nsca-2.9-fix_open_missing_arg.patch
@@ -0,0 +1,11 @@
+--- nsca-2.9/src/nsca.c.orig	2012-01-16 21:59:53.692250138 +0100
++++ nsca-2.9/src/nsca.c	2012-01-16 22:01:53.641670525 +0100
+@@ -477,7 +477,7 @@
+                             int checkresult_test_fd=-1;
+                             char *checkresult_test=NULL;
+                             asprintf(&checkresult_test,"%s/nsca.test.%i",check_result_path,getpid());
+-                            checkresult_test_fd=open(checkresult_test,O_WRONLY|O_CREAT);
++                            checkresult_test_fd=open(checkresult_test,O_WRONLY|O_CREAT,S_IWUSR);
+                             if (checkresult_test_fd>0){
+                                     unlink(checkresult_test);
+                                     }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-nsca.git/commitdiff/f6d714d532bdf11e8bc6ae64a975869d1651af7e



More information about the pld-cvs-commit mailing list