apparmor: put back designators in struct initialisers
authorStephen Rothwell <[email protected]>
Tue, 20 Jun 2017 04:50:36 +0000 (14:50 +1000)
committerJames Morris <[email protected]>
Wed, 28 Jun 2017 05:50:43 +0000 (15:50 +1000)
Fixes: 8014370f1257 ("apparmor: move path_link mediation to using labels")
Signed-off-by: Stephen Rothwell <[email protected]>
Acked-by: John Johansen <[email protected]>
Acked-by: Kees Cook <[email protected]>
Signed-off-by: James Morris <[email protected]>
security/apparmor/file.c

index b6e8e5b11e054ad1ff7ea19be63bd93fecc68076..3382518b87fa507200679cb9ef660329a292debc 100644 (file)
@@ -472,8 +472,8 @@ audit:
 int aa_path_link(struct aa_label *label, struct dentry *old_dentry,
                 const struct path *new_dir, struct dentry *new_dentry)
 {
-       struct path link = { new_dir->mnt, new_dentry };
-       struct path target = { new_dir->mnt, old_dentry };
+       struct path link = { .mnt = new_dir->mnt, .dentry = new_dentry };
+       struct path target = { .mnt = new_dir->mnt, .dentry = old_dentry };
        struct path_cond cond = {
                d_backing_inode(old_dentry)->i_uid,
                d_backing_inode(old_dentry)->i_mode