Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\umh.c Create Date:2022-07-28 09:22:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:proc_cap_handler

Proto:static int proc_cap_handler(struct ctl_table *table, int write, void __user *buffer, size_t *lenp, loff_t *ppos)

Type:int

Parameter:

TypeParameterName
struct ctl_table *table
intwrite
void __user *buffer
size_t *lenp
loff_t *ppos
640  If write && ( Not Check operation authority || Not Check operation authority ) Then Return -EPERM
648  spin_lock( & umh_sysctl_lock)
649  When i < _KERNEL_CAPABILITY_U32S cycle
650  If data == CAP_BSET Then cap_array[i] = cap[i]
652  Else if data == CAP_PI Then cap_array[i] = cap[i]
654  Else BUG()
657  spin_unlock( & umh_sysctl_lock)
659  t = table
660  data = cap_array
666  err = read a vector of long integers with min/max values
667  If err < 0 Then Return err
674  When i < _KERNEL_CAPABILITY_U32S cycle cap[i] = cap_array[i]
680  If write Then
681  spin_lock( & umh_sysctl_lock)
682  If data == CAP_BSET Then usermodehelper_bset = cap_intersect(usermodehelper_bset, new_cap)
684  If data == CAP_PI Then usermodehelper_inheritable = cap_intersect(usermodehelper_inheritable, new_cap)
686  spin_unlock( & umh_sysctl_lock)
689  Return 0