All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Guy Briggs <rgb@redhat.com>
To: linux-audit@redhat.com
Cc: Richard Guy Briggs <rgb@redhat.com>
Subject: [PATCH 10/14] fixup! audit: implement audit by executable
Date: Tue, 17 Jun 2014 23:09:45 -0400	[thread overview]
Message-ID: <21d32940e47f2ab4692508629bb47f0ae705c774.1403060033.git.rgb@redhat.com> (raw)
In-Reply-To: <cover.1403060033.git.rgb@redhat.com>
In-Reply-To: <cover.1403060033.git.rgb@redhat.com>

Check for existence of exe rule.
---
 kernel/audit_tree.c  |    2 +-
 kernel/audit_watch.c |    2 +-
 kernel/auditfilter.c |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 135944a..b4bf5d2 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -632,7 +632,7 @@ int audit_make_tree(struct audit_krule *rule, char *pathname, u32 op)
 	if (pathname[0] != '/' ||
 	    rule->listnr != AUDIT_FILTER_EXIT ||
 	    op != Audit_equal ||
-	    rule->inode_f || rule->watch || rule->tree)
+	    rule->inode_f || rule->watch || rule->exe || rule->tree)
 		return -EINVAL;
 	rule->tree = alloc_tree(pathname);
 	if (!rule->tree)
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index 70b4554..1169de3 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -196,7 +196,7 @@ int audit_to_watch(struct audit_krule *krule, char *path, int len, u32 op)
 	if (path[0] != '/' || path[len-1] == '/' ||
 	    krule->listnr != AUDIT_FILTER_EXIT ||
 	    op != Audit_equal ||
-	    krule->inode_f || krule->watch || krule->tree)
+	    krule->inode_f || krule->watch || krule->exe || krule->tree)
 		return -EINVAL;
 
 	watch = audit_init_watch(path);
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index cae8eae..eede673 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -148,7 +148,7 @@ static inline int audit_to_inode(struct audit_krule *krule,
 				 struct audit_field *f)
 {
 	if (krule->listnr != AUDIT_FILTER_EXIT ||
-	    krule->inode_f || krule->watch || krule->tree ||
+	    krule->inode_f || krule->watch || krule->exe || krule->tree ||
 	    (f->op != Audit_equal && f->op != Audit_not_equal))
 		return -EINVAL;
 
@@ -1423,7 +1423,7 @@ static int update_lsm_rule(struct audit_krule *r)
 		list_del_rcu(&entry->list);
 		list_del(&r->list);
 	} else {
-		if (r->watch || r->tree)
+		if (r->watch || r->exe || r->tree)
 			list_replace_init(&r->rlist, &nentry->rule.rlist);
 		list_replace_rcu(&entry->list, &nentry->list);
 		list_replace(&r->list, &nentry->rule.list);
-- 
1.7.1

  parent reply	other threads:[~2014-06-18  3:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18  3:09 [PATCH 00/14] audit by executable name Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 01/14] audit: implement audit by executable Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 02/14] audit: clean simple fsnotify implementation Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 03/14] audit: convert audit_exe to audit_fsnotify Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 04/14] fixup! " Richard Guy Briggs
2014-06-18 13:38   ` Eric Paris
2014-06-18 20:18     ` Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 05/14] fixup! audit: clean simple fsnotify implementation Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 06/14] audit: avoid double copying the audit_exe path string Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 07/14] fixup! audit: convert audit_exe to audit_fsnotify Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 08/14] fixup! audit: clean simple fsnotify implementation Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 09/14] audit: put rule existence check in canonical order Richard Guy Briggs
2014-06-18  3:09 ` Richard Guy Briggs [this message]
2014-06-18  3:09 ` [PATCH 11/14] fixup! audit: implement audit by executable Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 12/14] fixup! audit: clean simple fsnotify implementation Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 13/14] audit: continue fleshing out audit by exe Richard Guy Briggs
2014-06-18 14:08   ` Eric Paris
2014-06-25 20:19     ` Richard Guy Briggs
2014-06-18  3:09 ` [PATCH 14/14] audit: enable audit_get/put_mark() Richard Guy Briggs
2014-06-18 14:09   ` Eric Paris
2014-06-18 20:21     ` Richard Guy Briggs

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=21d32940e47f2ab4692508629bb47f0ae705c774.1403060033.git.rgb@redhat.com \
    --to=rgb@redhat.com \
    --cc=linux-audit@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.