Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:scrypt_has_permitted_context() - is a file's encryption policy permitted* within its directory?*@parent: inode for parent directory*@child: inode for file being looked up, opened, or linked into @parent* Filesystems must call this before permitting access

Proto:int fscrypt_has_permitted_context(struct inode *parent, struct inode *child)

Type:int

Parameter:

TypeParameterName
struct inode *parent
struct inode *child
453  If Not S_ISREG(i_mode) && Not S_ISDIR(i_mode) && Not S_ISLNK(i_mode) Then Return 1
458  If Not IS_ENCRYPTED(parent) Then Return 1
462  If Not IS_ENCRYPTED(child) Then Return 0
480  err = fscrypt_get_encryption_info(parent)
481  If err Then Return 0
483  err = fscrypt_get_encryption_info(child)
484  If err Then Return 0
487  err = fscrypt_get_policy(parent, & parent_policy)
488  If err Then Return 0
491  err = fscrypt_get_policy(child, & child_policy)
492  If err Then Return 0
495  Return scrypt_policies_equal - check whether two encryption policies are the same* Return: %true if equal, else %false
Caller
NameDescribe
__fscrypt_prepare_link
__fscrypt_prepare_rename