summaryrefslogtreecommitdiff
path: root/security/apparmor
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2014-07-25 04:01:56 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-25 15:54:21 +0100
commit3e6dec86bcd4e8f39ab577431f346f6ad2b23af2 (patch)
tree3f32a99db4c9e2d357ab5a7440cb50665adccfaa /security/apparmor
parent1c374c2c1a1a52cab1c1cd4260af0d77ffdc81f2 (diff)
apparmor: fix update the mtime of the profile file on replacement
commit d671e890205a663429da74e1972e652bea4d73ab upstream. Signed-off-by: John Johansen <john.johansen@canonical.com> Acked-by: Seth Arnold <seth.arnold@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security/apparmor')
-rw-r--r--security/apparmor/apparmorfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 9068369f8a1b..0d8dd71f989e 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -380,6 +380,8 @@ void __aa_fs_profile_migrate_dents(struct aa_profile *old,
for (i = 0; i < AAFS_PROF_SIZEOF; i++) {
new->dents[i] = old->dents[i];
+ if (new->dents[i])
+ new->dents[i]->d_inode->i_mtime = CURRENT_TIME;
old->dents[i] = NULL;
}
}