Re: [Nagios-devel] Nagios3-CVS Patch - Small Bug in config.c with

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Nagios3-CVS Patch - Small Bug in config.c with

Post by Guest »

This is a multi-part message in MIME format.
--------------060908080003040003010704
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

There was a typo in my last patch according to the try to printout the
actual temp_path value with snprintf...

Please take this patch instead!

Regards
Hendrik

--------------060908080003040003010704
Content-Type: text/x-patch;
name="config.c.-temp_path_checking-v2.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="config.c.-temp_path_checking-v2.patch"

--- ./nagios3-clean/base/config.c 2007-03-25 10:06:23.000000000 +0200
+++ ./nagios3/base/config.c 2007-03-25 11:18:09.000000000 +0200
@@ -404,6 +404,20 @@
break;
}

+ if(opendir((char *)value)==NULL){
+ strcpy(error_message,"Temp path is not valid");
+ error=TRUE;
+ break;
+ }
+ // Maybe we should close the dirhandle but what to close
+ // without a normal DIR handle?
+ // With a temp DIR Handle there would be a new only temp variable...
+ //
+ // closedir(SOMESTUPID_HANDLE);
+ //
+ // Maybe we should check if the DIR Handle is writeable by us?
+ // AFAIK we need ...
+
my_free((void **)&temp_path);
if((temp_path=(char *)strdup(value))){
strip(temp_path);

--------------060908080003040003010704--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked