Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:smack_shm_shmctl - Smack access check for shm*@isp: the object*@cmd: what it wants to do* Returns 0 if current has the requested access, error code otherwise

Proto:static int smack_shm_shmctl(struct kern_ipc_perm *isp, int cmd)

Type:int

Parameter:

TypeParameterName
struct kern_ipc_perm *isp
intcmd
2980  Case cmd == get ipc_perm options
2981  Case cmd == pcs ctl commands
2982  Case cmd == SHM_STAT_ANY
2983  may = MAY_READ
2984  Break
2985  Case cmd == set ipc_perm options
2986  Case cmd == super user shmctl commands
2987  Case cmd == SHM_UNLOCK
2988  Case cmd == move resource
2989  may = MAY_READWRITE
2990  Break
2991  Case cmd == see ipcs
2992  Case cmd == SHM_INFO
2996  Return 0
2997  Default
2998  Return -EINVAL
3000  Return smk_curacc_shm : check if current has access on shm*@isp : the object*@access : access requested* Returns 0 if current has the requested access, error code otherwise