函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aa_setprocattr_chagnehat - handle procattr interface to change_hat*@args: args received from writing to /proc/<pid>/attr/current (NOT NULL)*@size: size of the args*@flags: set of flags governing behavior* Returns: %0 or error code if change_hat fails

函数原型:int aa_setprocattr_changehat(char *args, size_t size, int flags)

返回类型:int

参数:

类型参数名称
char *args
size_tsize
intflags
107  count等于0
109  hat等于split_token_from_name - separate a string of form ^*@op: operation being checked*@args: string to parse (NOT NULL)*@token: stores returned parsed token value (NOT NULL)* Returns: start position of name after token else NULL on failure
110  如果是错误则返回:错误
113  如果非hat且非token
114  AA_ERROR("change_hat: Invalid input, NULL hat and NULL magic")
115  返回:负EINVAL
118  如果hat
125  end等于argssize
126 hat小于endcount小于16循环
128  hats[count]等于hat
129  AA_DEBUG("%s: (pid %d) Magic 0x%llx count %d hat '%s'\n", __func__, pid, token, count, hat)
131  hat等于next
133  否则AA_DEBUG("%s: (pid %d) Magic 0x%llx count %d Hat '%s'\n", __func__, pid, token, count, "<NULL>")
137  返回:aa_change_hat - change hat to/from subprofile*@hats: vector of hat names to try changing into (MAYBE NULL if @count == 0)*@count: number of hat names in @hats*@token: magic value to validate the hat change*@flags: flags affecting behavior of the change
调用者
名称描述
apparmor_setprocattr