]> git.hungrycats.org Git - linux/commitdiff
apparmor: fix update the mtime of the profile file on replacement
authorJohn Johansen <john.johansen@canonical.com>
Fri, 25 Jul 2014 11:01:56 +0000 (04:01 -0700)
committerJiri Slaby <jslaby@suse.cz>
Fri, 27 Jan 2017 10:16:07 +0000 (11:16 +0100)
commit d671e890205a663429da74e1972e652bea4d73ab upstream.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
security/apparmor/apparmorfs.c

index b30489856741d1d9bc78d9cb74439a88c18778f8..a798c75c772616c6e4fb64a9a50d0a4479a7a924 100644 (file)
@@ -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;
        }
 }