Whamcloud - gitweb
LU-8955 nodemap: add SELinux policy info to nodemap 39/34639/4
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 6 Dec 2018 09:40:45 +0000 (10:40 +0100)
committerOleg Drokin <green@whamcloud.com>
Tue, 16 Apr 2019 20:50:21 +0000 (20:50 +0000)
commitf1c8a02d75a83f0f2056437af3c5ab42ef2b1673
tree54dc2da870f96f7da6bd17beca2d95bbd97f64fd
parent60e12ac3a7b0e3c1f00d4ce17b39d617a092417a
LU-8955 nodemap: add SELinux policy info to nodemap

Give the ability to set SELinux policy information on a nodemap,
in a new nodemap field named 'sepol'.
When set, a client pertaining to this nodemap will be allowed to
connect only if the SELinux policy information it sends matches
the one stored in the nodemap.

Expected 'sepol' string format is:
<1-digit>:<policy name>:<policy version>:<policy hash>
1-digit is 0 for SELinux Permissive mode, 1 for Enforcing mode.

SELinux policy info of nodemap is stored permanently by using
'lctl set_param -P' commands. It means MDS and OSS will be able to
retrieve SELinux policy info of nodemap after a restart (when they
read params llog).
MGS will not see SElinux policy info after restart, but this does
not prevent the feature from working.

Lustre-change: https://review.whamcloud.com/24420
Lustre-commit: 1f6cb3534e74f0c9462008c8088b5734b64ed41c

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ia1d178dd34f05ede020b490b1797a71dbae15d7b
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34639
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre_nodemap.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/mgs/mgs_handler.c
lustre/mgs/mgs_llog.c
lustre/ptlrpc/nodemap_handler.c
lustre/ptlrpc/nodemap_lproc.c
lustre/utils/lctl.c
lustre/utils/obd.c
lustre/utils/obdctl.h