diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | doc/imudp.html | 8 | ||||
-rw-r--r-- | plugins/imudp/imudp.c | 10 |
3 files changed, 17 insertions, 3 deletions
@@ -10,6 +10,8 @@ Version 7.2.7 [v7-stable] 2013-03-?? - improved debugging support in forked (auto-backgrounding) mode The rsyslog debug log file is now continued to be written across the fork. +- bugfix: imudp scheduling parameters did affect main thread, not imudp + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=409 - bugfix: imuxsock rate-limiting could not be configured via legacy conf Rate-limiting for the system socket could not be configured via legacy configuration directives. However, the new-style RainerScript config diff --git a/doc/imudp.html b/doc/imudp.html index 1ebce4d7..105e0b2a 100644 --- a/doc/imudp.html +++ b/doc/imudp.html @@ -33,7 +33,7 @@ the value, the less precise the timestamp. <li><b>SchedulingPolicy</b> <rr/fifo/other><br> Can be used the set the scheduler priority, if the necessary functionality is provided by the platform. Most useful to select "fifo" for real-time -processing under Linux (and thus reduce chance of packet loss). +processing under Linux (and thus reduce chance of packet loss). <li><b>SchedulingPriority</b> <number><br> Scheduling priority to use. </ul> @@ -50,7 +50,11 @@ Binds the listener to a specific <a href="multi_ruleset.html">ruleset</a>.</li> </ul> <b>Caveats/Known Bugs:</b> <ul> -<li>currently none known</li> +<li>Scheduling parameters are set <b>after</b> privileges have been dropped. +In most cases, this means that setting them will not be possible after +privilege drop. This may be worked around by using a sufficiently-privileged +user account. +</li> </ul> <p><b>Sample:</b></p> <p>This sets up an UPD server on port 514:<br> diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 782d7bee..06e1471d 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -832,7 +832,6 @@ CODESTARTactivateCnfPrePrivDrop ABORT_FINALIZE(RS_RET_NO_RUN); } - setSchedParams(pModConf); finalize_it: ENDactivateCnfPrePrivDrop @@ -865,6 +864,15 @@ ENDfreeCnf */ BEGINrunInput CODESTARTrunInput + /* Note well: the setting of scheduling parameters will not work + * when we dropped privileges (if the user is not sufficently + * privileged, of course). Howerver, we can't change the + * scheduling params in PrePrivDrop(), as at that point our thread + * is not yet created. So at least as an interim solution, we do + * NOT support both setting sched parameters and dropping + * privileges within the same instance. + */ + setSchedParams(runModConf); iRet = rcvMainLoop(pThrd); ENDrunInput |