Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aa_write_access - generic permissions and data query*@file: pointer to open apparmorfs/access file*@ubuf: user buffer containing the complete query string (NOT NULL)*@count: size of ubuf*@ppos: position in the file (MUST BE ZERO)* Allows for one

Proto:static ssize_t aa_write_access(struct file *file, const char __user *ubuf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *ubuf
size_tcount
loff_t *ppos
968  If ppos Then Return -ESPIPE
971  t = multi_transaction_new(file, ubuf, count)
972  If IS_ERR(t) Then Return PTR_ERR(t)
975  If count > QUERY_CMD_PROFILE_LEN && Not memcmp(data, QUERY_CMD_PROFILE, QUERY_CMD_PROFILE_LEN) Then
977  len = query_label - queries a label and writes permissions to buf*@buf: the resulting permissions string is stored here (NOT NULL)*@buf_len: size of buf*@query: binary query string to match against the dfa*@query_len: size of query*@view_only: only compute for
980  Else if count > QUERY_CMD_LABEL_LEN && Not memcmp(data, QUERY_CMD_LABEL, QUERY_CMD_LABEL_LEN) Then
982  len = query_label - queries a label and writes permissions to buf*@buf: the resulting permissions string is stored here (NOT NULL)*@buf_len: size of buf*@query: binary query string to match against the dfa*@query_len: size of query*@view_only: only compute for
985  Else if count > QUERY_CMD_LABELALL_LEN && Not memcmp(data, QUERY_CMD_LABELALL, QUERY_CMD_LABELALL_LEN) Then
988  len = query_label - queries a label and writes permissions to buf*@buf: the resulting permissions string is stored here (NOT NULL)*@buf_len: size of buf*@query: binary query string to match against the dfa*@query_len: size of query*@view_only: only compute for
991  Else if count > QUERY_CMD_DATA_LEN && Not memcmp(data, QUERY_CMD_DATA, QUERY_CMD_DATA_LEN) Then
993  len = query_data - queries a policy and writes its data to buf*@buf: the resulting data is stored here (NOT NULL)*@buf_len: size of buf*@query: query string used to retrieve data*@query_len: size of query including second NUL byte
996  Else len = -EINVAL
999  If len < 0 Then
1000  put_multi_transaction(t)
1001  Return len
1004  does not increment @new's count
1006  Return count