[Pkg-nagios-devel] nagios changelog,1.14,1.15 update-nagios,1.2,1.3

joerg@haydn.debian.org joerg@haydn.debian.org


Update of /cvsroot/pkg-nagios/nagios
In directory haydn:/tmp/cvs-serv22654

Modified Files:
	changelog update-nagios 
Log Message:
  * Bug fix: "nagios: tmp file vulnerability in update-nagios", thanks to
    James Troup (Closes: #281210). Also moved the mv of the newly generated
    plugins-auto.cfg above the reload of nagios, which maybe helps nagios to
    find the new commands. :)


Index: changelog
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/changelog,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- changelog	14 Nov 2004 23:11:57 -0000	1.14
+++ changelog	15 Nov 2004 22:58:21 -0000	1.15
@@ -1,3 +1,13 @@
+nagios (2:1.3-0+pre2) experimental; urgency=low
+
+  * Joerg Jaspert:
+    - Bug fix: "nagios: tmp file vulnerability in update-nagios", thanks to
+      James Troup (Closes: #281210). Also moved the mv of the newly generated
+      plugins-auto.cfg above the reload of nagios, which maybe helps nagios to
+      find the new commands. :)
+
+ -- Joerg Jaspert <joerg@debian.org>  Mon, 15 Nov 2004 23:57:23 +0100
+
 nagios (2:1.3-0+pre1) experimental; urgency=low
 
   * Joerg Jaspert:

Index: update-nagios
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios/update-nagios,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- update-nagios	13 Nov 2004 23:56:20 -0000	1.2
+++ update-nagios	15 Nov 2004 22:58:21 -0000	1.3
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 
-OUT=/tmp/nagios_checkcommands.cfg
+OUT=`tempfile`
 DEST=/var/cache/nagios/plugins-auto.cfg
 
 cat > $OUT <<EOT
@@ -32,6 +32,8 @@
   fi
 done
 
+mv -f $OUT $DEST
+
 if $FOUND_PLUGINS; then
 	if [ -x /etc/init.d/nagios -a "$1" != "--no-reload" ] ; then	
 		/etc/init.d/nagios reload
@@ -41,5 +43,3 @@
     echo "found in /etc/nagios-plugins/config. Won't reload nagios."
     exit 0
 fi
-
-mv -f $OUT $DEST