Skip to content

Commit 025aa56

Browse files
committed
audispd: fix max_restarts handling
The dispatcher no longer treats plugins that exceed the configured restart limit as successfully restarted. Instead, it marks them inactive and returns failure, preventing further writes to an invalid pipe
1 parent 9e62209 commit 025aa56

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

audisp/audispd.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,11 @@ static void load_plugin_conf(conf_llist *plugin)
153153

154154
static int start_one_plugin(lnode *conf)
155155
{
156-
if (conf->p->restart_cnt > daemon_config.max_restarts)
157-
return 1;
156+
if (conf->p->restart_cnt > daemon_config.max_restarts) {
157+
/* Do not mark active when max restarts exceeded */
158+
conf->p->active = A_NO;
159+
return 0;
160+
}
158161

159162
if (conf->p->type == S_ALWAYS) {
160163
if (safe_exec(conf->p)) {

0 commit comments

Comments
 (0)