diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-26 20:11:05 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-29 02:33:43 +0200 |
commit | 795d673af1afae8146ac3070a2d77cfae5287c43 (patch) | |
tree | 1c0f3284601cfd891044ecc3c605584f91f155c3 /kernel/auditfilter.c | |
parent | audit_update_watch(): switch to const struct qstr * (diff) | |
download | linux-795d673af1afae8146ac3070a2d77cfae5287c43.tar.xz linux-795d673af1afae8146ac3070a2d77cfae5287c43.zip |
audit_compare_dname_path(): switch to const struct qstr *
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/auditfilter.c')
-rw-r--r-- | kernel/auditfilter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index 63f8b3f26fab..f9fff93c3351 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -1290,12 +1290,12 @@ int parent_len(const char *path) * @parentlen: length of the parent if known. Passing in AUDIT_NAME_FULL * here indicates that we must compute this value. */ -int audit_compare_dname_path(const char *dname, const char *path, int parentlen) +int audit_compare_dname_path(const struct qstr *dname, const char *path, int parentlen) { int dlen, pathlen; const char *p; - dlen = strlen(dname); + dlen = dname->len; pathlen = strlen(path); if (pathlen < dlen) return 1; @@ -1306,7 +1306,7 @@ int audit_compare_dname_path(const char *dname, const char *path, int parentlen) p = path + parentlen; - return strncmp(p, dname, dlen); + return strncmp(p, dname->name, dlen); } int audit_filter(int msgtype, unsigned int listtype) |