Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:scrypt_fname_alloc_buffer - allocate a buffer for presented filenames* Allocate a buffer that is large enough to hold any decrypted or encoded* filename (null-terminated), for the given maximum encrypted filename length

Proto:int fscrypt_fname_alloc_buffer(const struct inode *inode, unsigned int max_encrypted_len, struct fscrypt_str *crypto_str)

Type:int

Parameter:

TypeParameterName
const struct inode *inode
unsigned intmax_encrypted_len
struct fscrypt_str *crypto_str
209  max_encoded_len = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, BASE64_CHARS(FSCRYPT_FNAME_MAX_UNDIGESTED_SIZE), 1 + BASE64_CHARS( size of fscrypt_digested_name ))
214  max_presented_len = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(max_encoded_len, max_encrypted_len)
216  name = Allocation memory
217  If Not name Then Return -ENOMEM
219  len = max_presented_len
220  Return 0
Caller
NameDescribe
fscrypt_get_symlinkscrypt_get_symlink - get the target of an encrypted symlink*@inode: the symlink inode*@caddr: the on-disk contents of the symlink*@max_size: size of @caddr buffer*@done: if successful, will be set up to free the returned target if needed