]> git.karo-electronics.de Git - linux-beck.git/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)
committerJohn Johansen <john.johansen@canonical.com>
Tue, 12 Jul 2016 15:43:10 +0000 (08:43 -0700)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
security/apparmor/apparmorfs.c

index ad4fa49ad1db23a70dfa16751a9c7f8ec006e854..45a6199ce23b8756074f1cb12b4483915040063e 100644 (file)
@@ -379,6 +379,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;
        }
 }