Linux-audit Archive on 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 08/12] [V3] fixup! audit: convert audit_exe to audit_fsnotify
Date: Wed,  2 Jul 2014 14:05:16 -0400	[thread overview]
Message-ID: <bb2c513763be4c6f8a870cebf73b35d280282c56.1404323960.git.rgb@redhat.com> (raw)
In-Reply-To: <cover.1404323960.git.rgb@redhat.com>
In-Reply-To: <cover.1404323960.git.rgb@redhat.com>

Put audit_alloc_mark() arguments in same order as watch, tree and inode.

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

diff --git a/kernel/audit.h b/kernel/audit.h
index 61688ba..7bf3138 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -283,7 +283,7 @@ extern void audit_remove_watch_rule(struct audit_krule *krule);
 extern char *audit_watch_path(struct audit_watch *watch);
 extern int audit_watch_compare(struct audit_watch *watch, unsigned long ino, dev_t dev);
 
-struct audit_fsnotify_mark *audit_alloc_mark(char *pathname, int len, struct audit_krule *krule);
+struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule, char *pathname, int len);
 char *audit_mark_path(struct audit_fsnotify_mark *mark);
 void audit_remove_mark(struct audit_fsnotify_mark *audit_mark);
 int audit_mark_compare(struct audit_fsnotify_mark *mark, unsigned long ino, dev_t dev);
diff --git a/kernel/audit_exe.c b/kernel/audit_exe.c
index b33a09a..0c7ee8d 100644
--- a/kernel/audit_exe.c
+++ b/kernel/audit_exe.c
@@ -29,7 +29,7 @@ int audit_dup_exe(struct audit_krule *new, struct audit_krule *old)
 
 	pathname = audit_mark_path(old->exe);
 
-	audit_mark = audit_alloc_mark(pathname, strlen(pathname), new);
+	audit_mark = audit_alloc_mark(new, pathname, strlen(pathname));
 	if (IS_ERR(audit_mark))
 		return PTR_ERR(audit_mark);
 	new->exe = audit_mark;
diff --git a/kernel/audit_fsnotify.c b/kernel/audit_fsnotify.c
index c396471..5469dc1 100644
--- a/kernel/audit_fsnotify.c
+++ b/kernel/audit_fsnotify.c
@@ -87,7 +87,7 @@ int audit_mark_compare(struct audit_fsnotify_mark *mark, unsigned long ino, dev_
 	return (mark->ino == ino) && (mark->dev == dev);
 }
 
-struct audit_fsnotify_mark *audit_alloc_mark(char *pathname, int len, struct audit_krule *krule)
+struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule, char *pathname, int len)
 {
 	struct audit_fsnotify_mark *audit_mark;
 	struct path path;
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 7ffbd7d..c3bf4bb 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -560,7 +560,7 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
 			}
 			entry->rule.buflen += f->val;
 
-			audit_mark = audit_alloc_mark(str, f->val, &entry->rule);
+			audit_mark = audit_alloc_mark(&entry->rule, str, f->val);
 			if (IS_ERR(audit_mark)) {
 				kfree(str);
 				err = PTR_ERR(audit_mark);
-- 
1.7.1

  parent reply	other threads:[~2014-07-02 18:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 18:05 [PATCH 00/12] [V3] audit by executable name Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 01/12] [V3] audit: implement audit by executable Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 02/12] [V3] audit: clean simple fsnotify implementation Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 03/12] [V3] audit: convert audit_exe to audit_fsnotify Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 04/12] [V3] fixup! audit: clean simple fsnotify implementation Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 05/12] [V3] fixup! audit: convert audit_exe to audit_fsnotify Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 06/12] [V3] fixup! audit: clean simple fsnotify implementation Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 07/12] [V3] audit: avoid double copying the audit_exe path string Richard Guy Briggs
2014-07-02 18:05 ` Richard Guy Briggs [this message]
2014-07-02 18:05 ` [PATCH 09/12] [V3] fixup! audit: clean simple fsnotify implementation Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 10/12] [V3] fixup! audit: implement audit by executable Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 11/12] [V3] fixup! audit: clean simple fsnotify implementation Richard Guy Briggs
2014-07-02 18:05 ` [PATCH 12/12] " 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=bb2c513763be4c6f8a870cebf73b35d280282c56.1404323960.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox