Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:apparmor_path_rename

Proto:static int apparmor_path_rename(const struct path *old_dir, struct dentry *old_dentry, const struct path *new_dir, struct dentry *new_dentry)

Type:int

Parameter:

TypeParameterName
const struct path *old_dir
struct dentry *old_dentry
const struct path *new_dir
struct dentry *new_dentry
357  error = 0
359  If Not path_mediated_fs(old_dentry) Then Return 0
362  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()*
363  If Not unconfined(label) Then
364  struct path old_path = {mnt = mnt, dentry = old_dentry}
366  struct path new_path = {mnt = mnt, dentry = new_dentry}
368  struct path_cond cond = {i_uid, i_mode}
372  error = aa_path_perm(OP_RENAME_SRC, label, & old_path, 0, MAY_READ | meta read | MAY_WRITE | meta write | AA_MAY_DELETE, & cond)
376  If Not error Then error = aa_path_perm(OP_RENAME_DEST, label, & new_path, 0, MAY_WRITE | meta write | AA_MAY_CREATE, & cond)
382  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
384  Return error