Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-28 19:02:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Note, at this point, sma is locked down

Proto:static int selinux_sem_semctl(struct kern_ipc_perm *sma, int cmd)

Type:int

Parameter:

TypeParameterName
struct kern_ipc_perm *sma
intcmd
6203  Case cmd == see ipcs
6204  Case cmd == SEM_INFO
6206  Return avc_has_perm - Check permissions and perform any appropriate auditing
6209  Case cmd == get sempid
6210  Case cmd == get semncnt
6211  Case cmd == get semzcnt
6212  perms = SEM__GETATTR
6213  Break
6214  Case cmd == get semval
6215  Case cmd == get all semval's
6216  perms = SEM__READ
6217  Break
6218  Case cmd == set semval
6219  Case cmd == set all semval's
6220  perms = SEM__WRITE
6221  Break
6222  Case cmd == move resource
6223  perms = SEM__DESTROY
6224  Break
6225  Case cmd == set ipc_perm options
6226  perms = SEM__SETATTR
6227  Break
6228  Case cmd == get ipc_perm options
6229  Case cmd == pcs ctl cmds
6230  Case cmd == SEM_STAT_ANY
6231  perms = SEM__GETATTR | SEM__ASSOCIATE
6232  Break
6233  Default
6234  Return 0
6237  err = ipc_has_perm(sma, perms)
6238  Return err