projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
554f072
)
staging: lustre: hsm: permission checks for HSM ioctl operations
author
John L. Hammond
<
[email protected]
>
Tue, 12 Apr 2016 20:14:15 +0000
(16:14 -0400)
committer
Greg Kroah-Hartman
<
[email protected]
>
Tue, 26 Apr 2016 22:13:13 +0000
(15:13 -0700)
In the LL_IOC_HSM_CT_START case of ll_dir_ioctl() require
CAP_SYS_ADMIN, since the local handler for this ioctl may modify the
global KUC table.
Signed-off-by: John L. Hammond <
[email protected]
>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3866
Reviewed-on: http://review.whamcloud.com/7565
Reviewed-by: Aurelien Degremont <
[email protected]
>
Reviewed-by: Faccini Bruno <
[email protected]
>
Reviewed-by: Jinshan Xiong <
[email protected]
>
Reviewed-by: Oleg Drokin <
[email protected]
>
Signed-off-by: James Simmons <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/lustre/lustre/llite/dir.c
patch
|
blob
|
history
diff --git
a/drivers/staging/lustre/lustre/llite/dir.c
b/drivers/staging/lustre/lustre/llite/dir.c
index 1d5366b15a1b4e36b8fb03a4a367edfafe6afeb9..b457c28d0a29aadd8d0ce076c01968dd8f44b0f2 100644
(file)
--- a/
drivers/staging/lustre/lustre/llite/dir.c
+++ b/
drivers/staging/lustre/lustre/llite/dir.c
@@
-1843,6
+1843,9
@@
out_quotactl:
return rc;
}
case LL_IOC_HSM_CT_START:
+ if (!capable(CFS_CAP_SYS_ADMIN))
+ return -EPERM;
+
rc = copy_and_ioctl(cmd, sbi->ll_md_exp, (void __user *)arg,
sizeof(struct lustre_kernelcomm));
return rc;