Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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)

Proto:int aa_path_link(struct aa_label *label, struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry)

Type:int

Parameter:

TypeParameterName
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  If Not buffer || Not buffer2 Then Go to 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  Return error