函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\smack\smackfs.c Create Date:2022-07-27 20:58:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:smk_user_access - handle access check transaction*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0

函数原型:static ssize_t smk_user_access(struct file *file, const char __user *buf, size_t count, loff_t *ppos, int format)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buf
size_tcount
loff_t *ppos
intformat
2265  data等于simple_transaction_get(file, buf, count)
2266  如果是错误则返回:错误
2269  如果format恒等于Fixed 24byte label format
2270  如果count小于SMK_LOADLEN则返回:负EINVAL
2272  res等于smk_parse_rule - parse Smack rule from load string*@data: string to be parsed whose size is SMK_LOADLEN*@rule: Smack rule*@import: if non-zero, import labels* Returns 0 on success, -1 on errors.
2273  否则
2277  res等于smk_parse_long_rule - parse Smack rule from rule string*@data: string to be parsed, null terminated*@rule: Will be filled with Smack parsed rule*@import: if non-zero, import labels*@tokens: numer of substrings expected in data
2280  如果res大于等于0则res等于smk_access - determine if a subject has a specific access to an object*@subject: a pointer to the subject's Smack label entry*@object: a pointer to the object's Smack label entry*@request: the access requested, in "MAY" format*@a : a pointer to the audit
2283  否则如果res不等于负ENOENT则返回:res
2289  data[0]等于如果res大于等于0则'1'否则'0'
2290  data[1]等于'\0'
2292  simple_transaction_set(file, 2)
2294  如果format恒等于Fixed 24byte label format 则返回:SMK_LOADLEN
2296  返回:count
调用者
名称描述
smk_write_accesssmk_write_access - handle access check transaction*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0
smk_write_access2smk_write_access2 - handle access check transaction*@file: file pointer*@buf: data from user space*@count: bytes sent*@ppos: where to start - must be 0