Whamcloud - gitweb
LU-8956 llite: set sec ctx on client's inode at create time 26/24426/8
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 9 Sep 2016 13:29:23 +0000 (15:29 +0200)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 29 May 2017 18:00:46 +0000 (18:00 +0000)
commit1d44980bcbd10f35b522acc4543a44dcea62eb72
treecb2b0a927f028b259f2188586e6bdf37f589425b
parent8c9c1f59d99c924e16317495269b8270cb0be921
LU-8956 llite: set sec ctx on client's inode at create time

On client side, security context must be set on the inode of
every new dir or file that is being created.

With LL_SBI_FILE_SECCTX, security context is obtained from the
dentry thanks to a call to ll_dentry_init_security(). And it is
saved to security.xxx xattr directly on MDS side when processing
the create request. So it is only necessary to call
security_inode_notifysecctx() to set the sec ctx on the client's
inode.

Without LL_SBI_FILE_SECCTX, security context can only be obtained
from the inode, ie after the file has been created on MDS side.
So use ll_inode_init_security() that will set the sec ctx on the
client's inode, and at the same time save it on disk to
security.xxx xattr, generating an additional request to the MDS.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I08b7828db6a4106cca0e78e57bed2967b86a922c
Reviewed-on: https://review.whamcloud.com/24426
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Tested-by: Jenkins
Reviewed-by: Jean-Baptiste Riaux <riaux.jb@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/dir.c
lustre/llite/namei.c