Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:may_create_in_sticky - Check whether an O_CREAT open in a sticky directory* should be allowed, or not, on files that already* exist

Proto:static int may_create_in_sticky(umode_t dir_mode, kuid_t dir_uid, struct inode *const inode)

Type:int

Parameter:

TypeParameterName
umode_tdir_mode
kuid_tdir_uid
struct inode *constinode
1024  If Not sysctl_protected_fifos && S_ISFIFO(i_mode) || Not sysctl_protected_regular && S_ISREG(i_mode) || Value is more likely to compile time(!(dir_mode & S_ISVTX)) || uid_eq(i_uid, dir_uid) || uid_eq(current_fsuid(), i_uid) Then Return 0
1031  If Value is more likely to compile time(dir_mode & 0002) || dir_mode & 0020 && ( sysctl_protected_fifos >= 2 && S_ISFIFO(i_mode) || sysctl_protected_regular >= 2 && S_ISREG(i_mode) ) Then
1035  operation = If S_ISFIFO(i_mode) Then "sticky_create_fifo" Else "sticky_create_regular"
1038  audit_log_path_denied - report a path restriction denial*@type: audit message type (AUDIT_ANOM_LINK, AUDIT_ANOM_CREAT, etc)*@operation: specific operation name
1039  Return -EACCES
1041  Return 0
Caller
NameDescribe
do_lastHandle the last step of open()