函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:apparmor_setprocattr

函数原型:static int apparmor_setprocattr(const char *name, void *value, size_t size)

返回类型:int

参数:

类型参数名称
const char *name
void *value
size_tsize
618  largs等于NULL, args等于value
621  TODO: cleanup audit init so we don't need _aad = {0,} (sa, LSM_AUDIT_DATA_NONE, OP_SETPROCATTR)
623  如果size恒等于0则返回:负EINVAL
627  如果args[size - 1]不等于'\0'则
629  largs等于args等于开辟内存
630  如果非args则返回:负ENOMEM
632  memcpy(args, value, size)
633  args[size]等于'\0'
636  error等于负EINVAL
637  args等于删除前导和尾随空格
638  command等于分割字符串
639  如果非args则转到:out
641  args等于字符串删除空格
642  如果非args则转到:out
645  arg_size等于sizeargs减如果largslargs否则value
646  如果字符串比较恒等于0则
647  如果字符串比较恒等于0则
650  否则如果字符串比较恒等于0则
653  否则如果字符串比较恒等于0则
655  否则如果字符串比较恒等于0则
657  否则如果字符串比较恒等于0则
659  否则转到:fail
661  否则如果字符串比较恒等于0则
662  如果字符串比较恒等于0则error等于aa_change_profile - perform a one-way profile transition*@fqname: name of profile may include namespace (NOT NULL)*@onexec: whether this transition is to take place immediately or at exec*@flags: flags affecting change behavior
664  否则如果字符串比较恒等于0则error等于aa_change_profile - perform a one-way profile transition*@fqname: name of profile may include namespace (NOT NULL)*@onexec: whether this transition is to take place immediately or at exec*@flags: flags affecting change behavior
667  否则转到:fail
669  否则转到:fail
673  如果非errorerror等于size
675  out :
676  释放内存
677  返回:error
679  fail :
680  label等于gin_current_label_crit_section - current's confining label and update it* Returns: up to date confining label or the ns unconfined label (NOT NULL)* Not safe to call inside locks* The returned reference must be put with end_current_label_crit_section()*
681  info等于name
682  error等于error等于负EINVAL
683  aa_audit_msg - Log a message to the audit subsystem*@sa: audit event structure (NOT NULL)*@cb: optional callback fn for type specific fields (MAYBE NULL)
684  d_label_crit_section - put a reference found with begin_current_label..*@label: label reference to put* Should only be used with a reference obtained with* begin_current_label_crit_section and never used in situations where the* task cred may be updated
685  转到:out