Whamcloud - gitweb
LU-13119 osd-ldiskfs: set f_cred for app armour 84/37184/4
authorJames Simmons <jsimmons@infradead.org>
Fri, 10 Jan 2020 14:30:47 +0000 (09:30 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 23 Jan 2020 05:32:07 +0000 (05:32 +0000)
commit33082e057d214793c70085a33f1d82b3915db3a9
treecca18078fe72b1fc627026c68e0cb2a18dde664f
parent3746550282c865deebb07bfd92bcb4d1dabdc675
LU-13119 osd-ldiskfs: set f_cred for app armour

The function interate_dir() interfaces with the security layer.
For some kernel versions on platforms that use app armour it
expects f_cred to be set. Currently osd-ldiskfs open codes the
creation of struct file so it is missing a cred. Fix this by
setting f_cred to the default current_cred().

Test-Parameters: testlist=sanity-lfsck serverdistro=sles12sp3

Change-Id: I38487e8ae99a0f70d6e430935b7d19523d414b4b
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/37184
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_scrub.c