From: "Chu Li" <chul@cn.fujitsu.com>
To: 'Steve Grubb' <sgrubb@redhat.com>
Cc: linux-audit@redhat.com
Subject: [Patch] Fix the bug of "exec /path-to-script" in audisp-remote.conf cann't be recognized
Date: Wed, 18 Feb 2009 10:48:59 +0800 [thread overview]
Message-ID: <003601c99173$73455540$958da70a@truly> (raw)
Hi Steve,
I set "exec /path-to-script" in /etc/audisp/audisp-remote.conf for
"network_failure_action". the syslog said that it's an invalid option.
It seems a bug in audisp-remote.conf.
Here is my patch for the latest codes. What's your opinion about such
modification?
Signed-off-by: Chu Li<chul@cn.fujitsu.com>
---
--- audisp/plugins/remote/remote-config.orig.c 2009-02-16 22:19:36.000000000
+0800
+++ audisp/plugins/remote/remote-config.c 2009-02-16 22:54:25.000000000 +0800
@@ -118,13 +118,13 @@ static const struct kw_pair keywords[] =
{"krb5_principal", krb5_principal_parser, 0 },
{"krb5_client_name", krb5_client_name_parser, 0 },
{"krb5_key_file", krb5_key_file_parser, 0 },
- {"network_failure_action", network_failure_action_parser, 0 },
- {"disk_low_action", disk_low_action_parser, 0 },
- {"disk_full_action", disk_full_action_parser, 0 },
- {"disk_error_action", disk_error_action_parser, 0 },
- {"remote_ending_action", remote_ending_action_parser, 0 },
- {"generic_error_action", generic_error_action_parser, 0 },
- {"generic_warning_action", generic_warning_action_parser, 0 },
+ {"network_failure_action", network_failure_action_parser, 1 },
+ {"disk_low_action", disk_low_action_parser, 1 },
+ {"disk_full_action", disk_full_action_parser, 1 },
+ {"disk_error_action", disk_error_action_parser, 1 },
+ {"remote_ending_action", remote_ending_action_parser, 1 },
+ {"generic_error_action", generic_error_action_parser, 1 },
+ {"generic_warning_action", generic_warning_action_parser, 1 },
{ NULL, NULL, 0 }
};
@@ -541,17 +541,13 @@ static int action_parser(struct nv_pair
int i;
for (i=0; fail_action_words[i].name != NULL; i++) {
if (strcasecmp(nv->value, fail_action_words[i].name) == 0) {
- *actp = fail_action_words[i].option;
- return 0;
- } else if (i == FA_EXEC) {
- if (strncasecmp(fail_action_words[i].name,
- nv->value, 4) == 0) {
+ if (i == FA_EXEC) {
if (check_exe_name(nv->option, line))
return 1;
*exep = strdup(nv->option);
- *actp = FA_EXEC;
- return 0;
}
+ *actp = fail_action_words[i].option;
+ return 0;
}
}
syslog(LOG_ERR, "Option %s not found - line %d", nv->value, line);
Regards
Chu Li
next reply other threads:[~2009-02-18 2:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-18 2:48 Chu Li [this message]
2009-02-19 21:57 ` [Patch] Fix the bug of "exec /path-to-script" in audisp-remote.conf cann't be recognized Steve Grubb
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003601c99173$73455540$958da70a@truly' \
--to=chul@cn.fujitsu.com \
--cc=linux-audit@redhat.com \
--cc=sgrubb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox