diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-14 07:57:15 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-14 07:57:15 +0000 |
commit | 4884ef844c8f5c4c6e61fca17a3edeca95cdb03c (patch) | |
tree | ef78b2ea8e93ee4022377c0871d7108d414d30dc /omusrmsg.c | |
parent | 602ef197d3f54f360cf44fb7b95e2d45f42606b1 (diff) | |
download | rsyslog-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.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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 */ |