Whamcloud - gitweb
LU-12826 mdt: limit root to change project state by default 56/37056/2
authorWang Shilong <wshilong@ddn.com>
Tue, 22 Oct 2019 06:15:02 +0000 (14:15 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 3 Jan 2020 23:43:39 +0000 (23:43 +0000)
commit11c9ec6384070c0627b45b17e16e1a1c9aea7249
tree3889bbba5bb5e193ee49bd8482665e69b4b41531
parentf46971cef33818dc1d91ac6ff511823b7091587d
LU-12826 mdt: limit root to change project state by default

The current project quota implementation allows users to
change the Project ID of files for which they have write
permission to any value. This is not useful if the project
quota is intended to be enforced instead of only being used
for quota accouting.

Change it so that by default only root can change the projid
of a file. Setting "mdt.*.enable_chprojid_gid" will allow
users with the specified numeric Group ID (eg. 1 = "admin") to
also change the projid of a file. Use "-1" to return the previous
behavior where all users can change the projid of their files.

Lustre-change: https://review.whamcloud.com/36544
Lustre-commit: 8fad70c0872ba13133024e4abf53a0bbee7ba1e9

Change-Id: I91c138d29f4d0b9bc607528d86893451904c9892
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/37056
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/md_object.h
lustre/mdd/mdd_object.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_lproc.c
lustre/mdt/mdt_reint.c
lustre/tests/sanity-quota.sh