summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2005-08-12 16:32:17 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2005-08-12 16:32:17 +0000
commitbe0d9edbee79d6a0331e64697642be393fe776ab (patch)
treec2a8b076d5e1250f18df49a1d7dcfa236c6f5df0
parent3f0d0495b964b8a285b46c48d840aa8285e9c834 (diff)
downloadrsyslog-be0d9edbee79d6a0331e64697642be393fe776ab.tar.gz
rsyslog-be0d9edbee79d6a0331e64697642be393fe776ab.tar.xz
rsyslog-be0d9edbee79d6a0331e64697642be393fe776ab.zip
made an error message appear if database action used in non-db build
-rw-r--r--NEWS3
-rw-r--r--syslogd.c10
2 files changed, 12 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 9b411d91..e4b322a4 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ Version 0.9.7 (RGer), 2005-08-15
- some of the previous doc files (like INSTALL) did not properly
reflect the changes to the build process and the new doc. Fixed
that.
+- changed syslogd.c so that when compiled without database support,
+ an error message is displayed when a database action is detected
+ in the config file (previously this was used as an user rule ;))
---------------------------------------------------------------------------
Version 0.9.6 (RGer), 2005-08-09
- greatly enhanced documentation. Now available in html format in
diff --git a/syslogd.c b/syslogd.c
index a8c077b1..00362a0e 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -5206,10 +5206,18 @@ void cfline(line, f)
dprintf(" template '%s'\n", szTemplateName);
break;
-#ifdef WITH_DB
case '>': /* rger 2004-10-28: added support for MySQL
* >server,dbname,userid,password
+ * rgerhards 2005-08-12: changed rsyslogd so that
+ * if no DB is selected and > is used, an error
+ * message is logged.
*/
+#ifndef WITH_DB
+ f->f_type = F_UNUSED;
+ errno = 0;
+ logerror("write to database action in config file, but rsyslogd compiled without "
+ "database functionality - ignored");
+#else /* WITH_DB defined! */
f->f_type = F_MYSQL;
p++;