Skip to content
Snippets Groups Projects
Commit 8bea8f86 authored by Paul Moore's avatar Paul Moore
Browse files

Automated merge of 'dev' into 'next'

* dev:
  audit: fix suffixed '/' filename matching
parents d9381508 e92eebb0
No related branches found
No related tags found
No related merge requests found
......@@ -1319,13 +1319,20 @@ int audit_compare_dname_path(const struct qstr *dname, const char *path, int par
if (pathlen < dlen)
return 1;
parentlen = parentlen == AUDIT_NAME_FULL ? parent_len(path) : parentlen;
if (pathlen - parentlen != dlen)
return 1;
if (parentlen == AUDIT_NAME_FULL)
parentlen = parent_len(path);
p = path + parentlen;
return strncmp(p, dname->name, dlen);
/* handle trailing slashes */
pathlen -= parentlen;
while (p[pathlen - 1] == '/')
pathlen--;
if (pathlen != dlen)
return 1;
return memcmp(p, dname->name, dlen);
}
int audit_filter(int msgtype, unsigned int listtype)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment