diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-10-10 15:25:24 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-12 00:32:01 -0400 |
commit | 563a0d1236c2c58d584ef122a5cdc9930e5860b3 (patch) | |
tree | 4432b3b2f6ef6c19e9bded14ae31942e2b58bd84 /kernel | |
parent | bfcec7087458812f575d9022b2d151641f34ee84 (diff) |
audit: remove dirlen argument to audit_compare_dname_path
All the callers set this to NULL now.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/audit.h | 3 | ||||
-rw-r--r-- | kernel/audit_watch.c | 2 | ||||
-rw-r--r-- | kernel/auditfilter.c | 6 | ||||
-rw-r--r-- | kernel/auditsc.c | 4 |
4 files changed, 5 insertions, 10 deletions
diff --git a/kernel/audit.h b/kernel/audit.h index 163b9a5d9441..1038e23eb61c 100644 --- a/kernel/audit.h +++ b/kernel/audit.h | |||
@@ -79,8 +79,7 @@ extern int audit_comparator(const u32 left, const u32 op, const u32 right); | |||
79 | extern int audit_uid_comparator(kuid_t left, u32 op, kuid_t right); | 79 | extern int audit_uid_comparator(kuid_t left, u32 op, kuid_t right); |
80 | extern int audit_gid_comparator(kgid_t left, u32 op, kgid_t right); | 80 | extern int audit_gid_comparator(kgid_t left, u32 op, kgid_t right); |
81 | extern int parent_len(const char *path); | 81 | extern int parent_len(const char *path); |
82 | extern int audit_compare_dname_path(const char *dname, const char *path, | 82 | extern int audit_compare_dname_path(const char *dname, const char *path); |
83 | int *dirlen); | ||
84 | extern struct sk_buff * audit_make_reply(int pid, int seq, int type, | 83 | extern struct sk_buff * audit_make_reply(int pid, int seq, int type, |
85 | int done, int multi, | 84 | int done, int multi, |
86 | const void *payload, int size); | 85 | const void *payload, int size); |
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 1c22ec3d87bc..deb97c139e0c 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -265,7 +265,7 @@ static void audit_update_watch(struct audit_parent *parent, | |||
265 | /* Run all of the watches on this parent looking for the one that | 265 | /* Run all of the watches on this parent looking for the one that |
266 | * matches the given dname */ | 266 | * matches the given dname */ |
267 | list_for_each_entry_safe(owatch, nextw, &parent->watches, wlist) { | 267 | list_for_each_entry_safe(owatch, nextw, &parent->watches, wlist) { |
268 | if (audit_compare_dname_path(dname, owatch->path, NULL)) | 268 | if (audit_compare_dname_path(dname, owatch->path)) |
269 | continue; | 269 | continue; |
270 | 270 | ||
271 | /* If the update involves invalidating rules, do the inode-based | 271 | /* If the update involves invalidating rules, do the inode-based |
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 71bb13598df3..ff4011c19b13 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c | |||
@@ -1330,8 +1330,7 @@ int parent_len(const char *path) | |||
1330 | 1330 | ||
1331 | /* Compare given dentry name with last component in given path, | 1331 | /* Compare given dentry name with last component in given path, |
1332 | * return of 0 indicates a match. */ | 1332 | * return of 0 indicates a match. */ |
1333 | int audit_compare_dname_path(const char *dname, const char *path, | 1333 | int audit_compare_dname_path(const char *dname, const char *path) |
1334 | int *dirlen) | ||
1335 | { | 1334 | { |
1336 | int dlen, plen; | 1335 | int dlen, plen; |
1337 | const char *p; | 1336 | const char *p; |
@@ -1360,9 +1359,6 @@ int audit_compare_dname_path(const char *dname, const char *path, | |||
1360 | p++; | 1359 | p++; |
1361 | } | 1360 | } |
1362 | 1361 | ||
1363 | /* return length of path's directory component */ | ||
1364 | if (dirlen) | ||
1365 | *dirlen = p - path; | ||
1366 | return strncmp(p, dname, dlen); | 1362 | return strncmp(p, dname, dlen); |
1367 | } | 1363 | } |
1368 | 1364 | ||
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index b87b28947acc..09c7b6b4f8e6 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -2222,7 +2222,7 @@ void __audit_inode_child(const struct inode *parent, | |||
2222 | continue; | 2222 | continue; |
2223 | 2223 | ||
2224 | if (n->ino == parent->i_ino && | 2224 | if (n->ino == parent->i_ino && |
2225 | !audit_compare_dname_path(dname, n->name, NULL)) { | 2225 | !audit_compare_dname_path(dname, n->name)) { |
2226 | found_parent = n->name; | 2226 | found_parent = n->name; |
2227 | goto add_names; | 2227 | goto add_names; |
2228 | } | 2228 | } |
@@ -2235,7 +2235,7 @@ void __audit_inode_child(const struct inode *parent, | |||
2235 | 2235 | ||
2236 | /* strcmp() is the more likely scenario */ | 2236 | /* strcmp() is the more likely scenario */ |
2237 | if (!strcmp(dname, n->name) || | 2237 | if (!strcmp(dname, n->name) || |
2238 | !audit_compare_dname_path(dname, n->name, NULL)) { | 2238 | !audit_compare_dname_path(dname, n->name)) { |
2239 | if (inode) | 2239 | if (inode) |
2240 | audit_copy_inode(n, dentry, inode); | 2240 | audit_copy_inode(n, dentry, inode); |
2241 | else | 2241 | else |