summaryrefslogtreecommitdiffstats
path: root/omusrmsg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-14 07:57:15 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-14 07:57:15 +0000
commit4884ef844c8f5c4c6e61fca17a3edeca95cdb03c (patch)
treeef78b2ea8e93ee4022377c0871d7108d414d30dc /omusrmsg.c
parent602ef197d3f54f360cf44fb7b95e2d45f42606b1 (diff)
downloadrsyslog-4884ef844c8f5c4c6e61fca17a3edeca95cdb03c.tar.gz
rsyslog-4884ef844c8f5c4c6e61fca17a3edeca95cdb03c.tar.xz
rsyslog-4884ef844c8f5c4c6e61fca17a3edeca95cdb03c.zip
- integrated patch from varmojfekoj to make the mysql module a loadable one
many thanks for the patch, MUCH appreciated
Diffstat (limited to 'omusrmsg.c')
-rw-r--r--omusrmsg.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/omusrmsg.c b/omusrmsg.c
index 736f325b..677ecbf8 100644
--- a/omusrmsg.c
+++ b/omusrmsg.c
@@ -266,6 +266,14 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
if(**pp != '*')
return RS_RET_CONFLINE_UNPROCESSED;
#endif
+ /* User names must begin with a gnu e-regex:
+ * [a-zA-Z0-9_.]
+ * plus '*' for wall
+ */
+ if (!*p || !((*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z')
+ || (*p >= '0' && *p <= '9') || *p == '_' || *p == '.' || *p == '*'))
+ return RS_RET_CONFLINE_UNPROCESSED;
+
if((iRet = createInstance(&pData)) != RS_RET_OK)
return iRet;
@@ -278,9 +286,9 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
!= RS_RET_OK)
return iRet;
} else {
- /* everything else is currently treated as a user name
- * TODO: we must reconsider this - see also comment in
- * loadBuildInModules() in syslogd.c
+ /* everything else beginning with the regex above
+ * is currently treated as a user name
+ * TODO: is this portable?
*/
dbgprintf("users: %s\n", p); /* ASP */
pData->bIsWall = 0; /* write to individual users */