diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-26 14:09:49 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-26 14:09:49 -0400 |
commit | 6921d4ebe418e7cce9f65c1f38c93ea82a1f546c (patch) | |
tree | 23555d96ba79388c2ac2935e8da5b928d78ade97 | |
parent | ce163918cd330158eb1a4c2a8fddec6b2e7d6d74 (diff) |
audit_update_watch(): switch to const struct qstr *
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | kernel/audit_watch.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 3c12fd5b680e..d832ce9df065 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -255,18 +255,19 @@ static void audit_watch_log_rule_change(struct audit_krule *r, struct audit_watc | |||
255 | 255 | ||
256 | /* Update inode info in audit rules based on filesystem event. */ | 256 | /* Update inode info in audit rules based on filesystem event. */ |
257 | static void audit_update_watch(struct audit_parent *parent, | 257 | static void audit_update_watch(struct audit_parent *parent, |
258 | const char *dname, dev_t dev, | 258 | const struct qstr *dname, dev_t dev, |
259 | unsigned long ino, unsigned invalidating) | 259 | unsigned long ino, unsigned invalidating) |
260 | { | 260 | { |
261 | struct audit_watch *owatch, *nwatch, *nextw; | 261 | struct audit_watch *owatch, *nwatch, *nextw; |
262 | struct audit_krule *r, *nextr; | 262 | struct audit_krule *r, *nextr; |
263 | struct audit_entry *oentry, *nentry; | 263 | struct audit_entry *oentry, *nentry; |
264 | const unsigned char *name = dname->name; | ||
264 | 265 | ||
265 | mutex_lock(&audit_filter_mutex); | 266 | mutex_lock(&audit_filter_mutex); |
266 | /* Run all of the watches on this parent looking for the one that | 267 | /* Run all of the watches on this parent looking for the one that |
267 | * matches the given dname */ | 268 | * matches the given dname */ |
268 | list_for_each_entry_safe(owatch, nextw, &parent->watches, wlist) { | 269 | list_for_each_entry_safe(owatch, nextw, &parent->watches, wlist) { |
269 | if (audit_compare_dname_path(dname, owatch->path, | 270 | if (audit_compare_dname_path(name, owatch->path, |
270 | AUDIT_NAME_FULL)) | 271 | AUDIT_NAME_FULL)) |
271 | continue; | 272 | continue; |
272 | 273 | ||
@@ -507,9 +508,9 @@ static int audit_watch_handle_event(struct fsnotify_group *group, | |||
507 | } | 508 | } |
508 | 509 | ||
509 | if (mask & (FS_CREATE|FS_MOVED_TO) && inode) | 510 | if (mask & (FS_CREATE|FS_MOVED_TO) && inode) |
510 | audit_update_watch(parent, dname->name, inode->i_sb->s_dev, inode->i_ino, 0); | 511 | audit_update_watch(parent, dname, inode->i_sb->s_dev, inode->i_ino, 0); |
511 | else if (mask & (FS_DELETE|FS_MOVED_FROM)) | 512 | else if (mask & (FS_DELETE|FS_MOVED_FROM)) |
512 | audit_update_watch(parent, dname->name, AUDIT_DEV_UNSET, AUDIT_INO_UNSET, 1); | 513 | audit_update_watch(parent, dname, AUDIT_DEV_UNSET, AUDIT_INO_UNSET, 1); |
513 | else if (mask & (FS_DELETE_SELF|FS_UNMOUNT|FS_MOVE_SELF)) | 514 | else if (mask & (FS_DELETE_SELF|FS_UNMOUNT|FS_MOVE_SELF)) |
514 | audit_remove_parent_watches(parent); | 515 | audit_remove_parent_watches(parent); |
515 | 516 | ||