[Nagios-devel] nsca 2.9 ubuntu compile fix
Posted: Wed Jan 11, 2012 8:49 pm
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
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
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
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]