Update of /cvsroot/sblim/sfcb
In directory vz-cvs-3.sog:/tmp/cvs-serv17590
Modified Files:
ChangeLog NEWS mlog.c sfcBroker.c
Log Message:
[ 3567450 ] Clients shouldn't cause log messages
Index: NEWS
===================================================================
RCS file: /cvsroot/sblim/sfcb/NEWS,v
retrieving revision 1.714
retrieving revision 1.715
diff -u -d -r1.714 -r1.715
--- NEWS 28 Aug 2012 23:07:55 -0000 1.714
+++ NEWS 13 Sep 2012 20:32:53 -0000 1.715
@@ -4,6 +4,7 @@
- 3538858 custom routine to log indInst objinfo
- 3555395 Additional auth lib return codes
- 3562538 Enable curl debug via env variable
+- 3567450 Clients shouldn't cause log messages
Bugs fixed:
- 3539569 Leaks in interopProvider
Index: sfcBroker.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/sfcBroker.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- sfcBroker.c 13 Jun 2012 21:21:09 -0000 1.64
+++ sfcBroker.c 13 Sep 2012 20:32:53 -0000 1.65
@@ -58,6 +58,8 @@
int sfcBrokerPid=0;
+extern int sfcbUseSyslog;
+
extern void setExFlag(unsigned long f);
extern char *parseTarget(const char *target);
extern UtilStringBuffer *instanceToString(CMPIInstance * ci, char **props);
@@ -575,6 +577,7 @@
long dSockets,sSockets,pSockets;
char *pauseStr;
+ sfcbUseSyslog=1;
/* SF 3462309 - If there is an instance running already, return */
int pid_found = 0;
if ((pid_found = sfcb_is_running()) != 0) {
Index: mlog.c
===================================================================
RCS file: /cvsroot/sblim/sfcb/mlog.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- mlog.c 17 Feb 2012 22:54:59 -0000 1.14
+++ mlog.c 13 Sep 2012 20:32:53 -0000 1.15
@@ -39,6 +39,12 @@
FILE *log_w_stream;
int logfds[2] = { 0, 0 };
+/* Global variable to control syslog usage, by default it will be disabled.
+The sfcbd process will enable this for itself, but most clients won't.
+set to 1 to enable syslog
+*/
+int sfcbUseSyslog=0;
+
/*
+ * main function for the logger proc. Waits on a pipe and writes to syslog
+ * Will exit when the other side of the pipe closes
@@ -72,7 +78,9 @@
break;
}
- syslog(priosysl, "%s", buf + 1);
+ if (sfcbUseSyslog) {
+ syslog(priosysl, "%s", buf + 1);
+ }
}
return;
@@ -147,6 +155,10 @@
va_list ap;
char buf[LOG_MSG_MAX];
+
+ if (! sfcbUseSyslog) {
+ return;
+ }
va_start(ap, fmt);
// Leave a space for the /n on the end.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/sblim/sfcb/ChangeLog,v
retrieving revision 1.799
retrieving revision 1.800
diff -u -d -r1.799 -r1.800
--- ChangeLog 28 Aug 2012 23:07:55 -0000 1.799
+++ ChangeLog 13 Sep 2012 20:32:53 -0000 1.800
@@ -1,6 +1,11 @@
+2012-09-13 Michael Chase-Salerno <br...@li...>
+
+ * sfcBroker.c, mlog.c:
+ [ 3567450 ] Clients shouldn't cause log messages
+
2012-08-28 Dave Heller <hel...@us...>
- * indCIMXMLExport.c
+ * indCIMXMLExport.c:
[ 3562538 ] Enable curl debug via env variable
2012-08-08 Dave Heller <hel...@us...>
|