diff options
author | Kees Cook <keescook@chromium.org> | 2016-12-16 17:04:13 -0800 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-01-15 20:00:32 -0800 |
commit | 8486adf0d755062611968ecc1632a13ebce71660 (patch) | |
tree | 8e574a555e2fb2b9b01789607553245b93633c8b /security/apparmor/file.c | |
parent | a7f6c1b63b863d29f126d9b163ad5b40008544b2 (diff) | |
download | linux-stable-8486adf0d755062611968ecc1632a13ebce71660.tar.gz linux-stable-8486adf0d755062611968ecc1632a13ebce71660.tar.bz2 linux-stable-8486adf0d755062611968ecc1632a13ebce71660.zip |
apparmor: use designated initializers
Prepare to mark sensitive kernel structures for randomization by making
sure they're using designated initializers. These were identified during
allyesconfig builds of x86, arm, and arm64, with most initializer fixes
extracted from grsecurity.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/file.c')
-rw-r--r-- | security/apparmor/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/file.c b/security/apparmor/file.c index 4d2af4b01033..608971ac6781 100644 --- a/security/apparmor/file.c +++ b/security/apparmor/file.c @@ -349,8 +349,8 @@ static inline bool xindex_is_subset(u32 link, u32 target) int aa_path_link(struct aa_profile *profile, 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 |