Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Convert a Linux file to an access vector.

Proto:static inline unsigned int file_to_av(struct file *file)

Type:unsigned int

Parameter:

TypeParameterName
struct file *file
2007  av = 0
2009  If f_mode & le is open for reading Then av |= FILE__READ
2011  If f_mode & le is open for writing Then
2012  If f_flags & O_APPEND Then av |= FILE__APPEND
2014  Else av |= FILE__WRITE
2017  If Not av Then
2021  av = FILE__IOCTL
2024  Return av
Caller
NameDescribe
open_file_to_avConvert a file to an access vector and include the correct open* open permission.
selinux_binder_transfer_file
match_file
selinux_file_receive