nsca 2.9 ubuntu compile fix

Kyle O'Donnell kyleo at 0b10.mx
Wed Jan 11 21:31:26 CET 2012


Hi,

I tried compiling nsca 2.9 on my ubuntu 10.04.3 (64bit) system and it would fail.  After some googling I found the problem... there was a permission bit option missing. 

Here is the patch if anyone is interested:

--- nsca.c.old	2011-11-04 14:21:29.000000000 -0400
+++ nsca.c.new	2012-01-11 15:26:03.222242674 -0500
@@ -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,0644);
                             if (checkresult_test_fd>0){
                                     unlink(checkresult_test);
                                     }

--kyleo

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox




More information about the Developers mailing list