linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] audit: fixup: log on errors from filter user rules
@ 2016-05-16  2:47 Richard Guy Briggs
  2016-05-20 18:38 ` Paul Moore
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Guy Briggs @ 2016-05-16  2:47 UTC (permalink / raw)
  To: linux-audit, linux-kernel; +Cc: Richard Guy Briggs, sgrubb, pmoore, eparis

In commit 724e4fcc the intention was to pass any errors back from
audit_filter_user_rules() to audit_filter_user().  Add that code.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
---
 kernel/auditfilter.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index b8ff9e1..96c9a1b 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -1339,8 +1339,8 @@ static int audit_filter_user_rules(struct audit_krule *rule, int type,
 			break;
 		}
 
-		if (!result)
-			return 0;
+		if (result <= 0)
+			return result;
 	}
 	switch (rule->action) {
 	case AUDIT_NEVER:    *state = AUDIT_DISABLED;	    break;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] audit: fixup: log on errors from filter user rules
  2016-05-16  2:47 [PATCH] audit: fixup: log on errors from filter user rules Richard Guy Briggs
@ 2016-05-20 18:38 ` Paul Moore
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2016-05-20 18:38 UTC (permalink / raw)
  To: Richard Guy Briggs; +Cc: linux-audit, linux-kernel, sgrubb, eparis

On Sunday, May 15, 2016 10:47:39 PM Richard Guy Briggs wrote:
> In commit 724e4fcc the intention was to pass any errors back from
> audit_filter_user_rules() to audit_filter_user().  Add that code.
> 
> Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
> ---
>  kernel/auditfilter.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Looks good to me; queued up and should appear in audit#next after the merge 
window closes.

> diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
> index b8ff9e1..96c9a1b 100644
> --- a/kernel/auditfilter.c
> +++ b/kernel/auditfilter.c
> @@ -1339,8 +1339,8 @@ static int audit_filter_user_rules(struct audit_krule
> *rule, int type, break;
>  		}
> 
> -		if (!result)
> -			return 0;
> +		if (result <= 0)
> +			return result;
>  	}
>  	switch (rule->action) {
>  	case AUDIT_NEVER:    *state = AUDIT_DISABLED;	    break;

-- 
paul moore
security @ redhat

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-20 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-16  2:47 [PATCH] audit: fixup: log on errors from filter user rules Richard Guy Briggs
2016-05-20 18:38 ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).