Whamcloud - gitweb
LU-12826 mdt: limit root to change project state by default 44/36544/10
authorWang Shilong <wshilong@ddn.com>
Tue, 22 Oct 2019 06:15:02 +0000 (14:15 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 14 Dec 2019 05:56:59 +0000 (05:56 +0000)
commit8fad70c0872ba13133024e4abf53a0bbee7ba1e9
treea436aa4247da6be00678b787397a729f1817a430
parent41dd393ffbd94877dad411cfd66105379258b579
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.

Change-Id: I91c138d29f4d0b9bc607528d86893451904c9892
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/36544
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Reviewed-by: Oleg Drokin <green@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