Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Remaining nodes use transaction based IO methods like nfsd/nfsctl.c

Proto:static ssize_t sel_write_access(struct file *file, char *buf, size_t size)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
char *buf
size_tsize
810  fsi = s_fs_info
811  state = state
812  char * scon = NULL, * tcon = NULL
818  length = avc_has_perm - Check permissions and perform any appropriate auditing
821  If length Then Go to out
824  length = -ENOMEM
825  scon = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
826  If Not scon Then Go to out
829  length = -ENOMEM
830  tcon = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
831  If Not tcon Then Go to out
834  length = -EINVAL
835  If sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments != 3 Then Go to out
838  length = security_context_str_to_sid(state, scon, & ssid, GFP_KERNEL)
839  If length Then Go to out
842  length = security_context_str_to_sid(state, tcon, & tsid, GFP_KERNEL)
843  If length Then Go to out
846  security_compute_av_user(state, ssid, tsid, tclass, & avd)
848  length = scnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
853  out :
854  kfree(tcon)
855  kfree(scon)
856  Return length