函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aa_path_link - Handle hard link permission check*@label: the label being enforced (NOT NULL)*@old_dentry: the target dentry (NOT NULL)*@new_dir: directory the new link will be created in (NOT NULL)*@new_dentry: the link being created (NOT NULL)

函数原型:int aa_path_link(struct aa_label *label, struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry)

返回类型:int

参数:

类型参数名称
struct aa_label *label
struct dentry *old_dentry
const struct path *new_dir
struct dentry *new_dentry
469  struct path link = {mnt = mnt, dentry = new_dentry}
470  struct path target = {mnt = mnt, dentry = old_dentry}
471  struct path_cond cond = {i_uid, i_mode}
475  char * buffer = NULL, * buffer2 = NULL
480  buffer等于aa_get_buffer(false)
481  buffer2等于aa_get_buffer(false)
482  error等于负ENOMEM
483  如果非buffer或非buffer2则转到:out
486  error等于fn_for_each_confined(label, profile, profile_path_link(profile, & link, buffer, & target, buffer2, & cond))
489  out :
490  aa_put_buffer(buffer)
491  aa_put_buffer(buffer2)
492  返回:error