From 246d86d730da8e0f076a652f4f7d8a348c3af46d Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 10 Oct 2012 15:25:24 -0400 Subject: [PATCH] --- yaml --- r: 333898 b: refs/heads/master c: 563a0d1236c2c58d584ef122a5cdc9930e5860b3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/audit.h | 3 +-- trunk/kernel/audit_watch.c | 2 +- trunk/kernel/auditfilter.c | 6 +----- trunk/kernel/auditsc.c | 4 ++-- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 76ba1d25593d..7b732398c718 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bfcec7087458812f575d9022b2d151641f34ee84 +refs/heads/master: 563a0d1236c2c58d584ef122a5cdc9930e5860b3 diff --git a/trunk/kernel/audit.h b/trunk/kernel/audit.h index 163b9a5d9441..1038e23eb61c 100644 --- a/trunk/kernel/audit.h +++ b/trunk/kernel/audit.h @@ -79,8 +79,7 @@ extern int audit_comparator(const u32 left, const u32 op, const u32 right); extern int audit_uid_comparator(kuid_t left, u32 op, kuid_t right); extern int audit_gid_comparator(kgid_t left, u32 op, kgid_t right); extern int parent_len(const char *path); -extern int audit_compare_dname_path(const char *dname, const char *path, - int *dirlen); +extern int audit_compare_dname_path(const char *dname, const char *path); extern struct sk_buff * audit_make_reply(int pid, int seq, int type, int done, int multi, const void *payload, int size); diff --git a/trunk/kernel/audit_watch.c b/trunk/kernel/audit_watch.c index 1c22ec3d87bc..deb97c139e0c 100644 --- a/trunk/kernel/audit_watch.c +++ b/trunk/kernel/audit_watch.c @@ -265,7 +265,7 @@ static void audit_update_watch(struct audit_parent *parent, /* Run all of the watches on this parent looking for the one that * matches the given dname */ list_for_each_entry_safe(owatch, nextw, &parent->watches, wlist) { - if (audit_compare_dname_path(dname, owatch->path, NULL)) + if (audit_compare_dname_path(dname, owatch->path)) continue; /* If the update involves invalidating rules, do the inode-based diff --git a/trunk/kernel/auditfilter.c b/trunk/kernel/auditfilter.c index 71bb13598df3..ff4011c19b13 100644 --- a/trunk/kernel/auditfilter.c +++ b/trunk/kernel/auditfilter.c @@ -1330,8 +1330,7 @@ int parent_len(const char *path) /* Compare given dentry name with last component in given path, * return of 0 indicates a match. */ -int audit_compare_dname_path(const char *dname, const char *path, - int *dirlen) +int audit_compare_dname_path(const char *dname, const char *path) { int dlen, plen; const char *p; @@ -1360,9 +1359,6 @@ int audit_compare_dname_path(const char *dname, const char *path, p++; } - /* return length of path's directory component */ - if (dirlen) - *dirlen = p - path; return strncmp(p, dname, dlen); } diff --git a/trunk/kernel/auditsc.c b/trunk/kernel/auditsc.c index b87b28947acc..09c7b6b4f8e6 100644 --- a/trunk/kernel/auditsc.c +++ b/trunk/kernel/auditsc.c @@ -2222,7 +2222,7 @@ void __audit_inode_child(const struct inode *parent, continue; if (n->ino == parent->i_ino && - !audit_compare_dname_path(dname, n->name, NULL)) { + !audit_compare_dname_path(dname, n->name)) { found_parent = n->name; goto add_names; } @@ -2235,7 +2235,7 @@ void __audit_inode_child(const struct inode *parent, /* strcmp() is the more likely scenario */ if (!strcmp(dname, n->name) || - !audit_compare_dname_path(dname, n->name, NULL)) { + !audit_compare_dname_path(dname, n->name)) { if (inode) audit_copy_inode(n, dentry, inode); else