Commit 563a0d12 authored by Jeff Layton's avatar Jeff Layton Committed by Al Viro

audit: remove dirlen argument to audit_compare_dname_path

All the callers set this to NULL now.
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent bfcec708
...@@ -79,8 +79,7 @@ extern int audit_comparator(const u32 left, const u32 op, const u32 right); ...@@ -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_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 audit_gid_comparator(kgid_t left, u32 op, kgid_t right);
extern int parent_len(const char *path); extern int parent_len(const char *path);
extern int audit_compare_dname_path(const char *dname, const char *path, extern int audit_compare_dname_path(const char *dname, const char *path);
int *dirlen);
extern struct sk_buff * audit_make_reply(int pid, int seq, int type, extern struct sk_buff * audit_make_reply(int pid, int seq, int type,
int done, int multi, int done, int multi,
const void *payload, int size); const void *payload, int size);
......
...@@ -265,7 +265,7 @@ static void audit_update_watch(struct audit_parent *parent, ...@@ -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 /* Run all of the watches on this parent looking for the one that
* matches the given dname */ * matches the given dname */
list_for_each_entry_safe(owatch, nextw, &parent->watches, wlist) { 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; continue;
/* If the update involves invalidating rules, do the inode-based /* If the update involves invalidating rules, do the inode-based
......
...@@ -1330,8 +1330,7 @@ int parent_len(const char *path) ...@@ -1330,8 +1330,7 @@ int parent_len(const char *path)
/* Compare given dentry name with last component in given path, /* Compare given dentry name with last component in given path,
* return of 0 indicates a match. */ * return of 0 indicates a match. */
int audit_compare_dname_path(const char *dname, const char *path, int audit_compare_dname_path(const char *dname, const char *path)
int *dirlen)
{ {
int dlen, plen; int dlen, plen;
const char *p; const char *p;
...@@ -1360,9 +1359,6 @@ int audit_compare_dname_path(const char *dname, const char *path, ...@@ -1360,9 +1359,6 @@ int audit_compare_dname_path(const char *dname, const char *path,
p++; p++;
} }
/* return length of path's directory component */
if (dirlen)
*dirlen = p - path;
return strncmp(p, dname, dlen); return strncmp(p, dname, dlen);
} }
......
...@@ -2222,7 +2222,7 @@ void __audit_inode_child(const struct inode *parent, ...@@ -2222,7 +2222,7 @@ void __audit_inode_child(const struct inode *parent,
continue; continue;
if (n->ino == parent->i_ino && 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; found_parent = n->name;
goto add_names; goto add_names;
} }
...@@ -2235,7 +2235,7 @@ void __audit_inode_child(const struct inode *parent, ...@@ -2235,7 +2235,7 @@ void __audit_inode_child(const struct inode *parent,
/* strcmp() is the more likely scenario */ /* strcmp() is the more likely scenario */
if (!strcmp(dname, n->name) || if (!strcmp(dname, n->name) ||
!audit_compare_dname_path(dname, n->name, NULL)) { !audit_compare_dname_path(dname, n->name)) {
if (inode) if (inode)
audit_copy_inode(n, dentry, inode); audit_copy_inode(n, dentry, inode);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment