函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\open.c Create Date:2022-07-29 10:30:59
Last Modify:2020-03-18 10:16:03 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:chown_common

函数原型:static int chown_common(const struct path *path, uid_t user, gid_t group)

返回类型:int

参数:

类型参数名称
const struct path *path
uid_tuser
gid_tgroup
622  inode等于 Where the name belongs to - NULL is * negative
623  struct inode * delegated_inode = NULL
629  uid等于make_kuid - Map a user-namespace uid pair into a kuid
630  gid等于make_kgid(current_user_ns(), group)
632  retry_deleg :
633  ia_valid等于ATTR_CTIME
634  如果(user != (uid_t) - 1)则
635  如果非uid_valid(uid)则返回:负EINVAL
637  ia_valid或等于ATTR_UID
638  ia_uid等于uid
640  如果(group != (gid_t) - 1)则
641  如果非gid_valid(gid)则返回:负EINVAL
643  ia_valid或等于ATTR_GID
644  ia_gid等于gid
646  如果非S_ISDIR(i_mode)则ia_valid或等于ATTR_KILL_SUID按位或ATTR_KILL_SGID按位或ATTR_KILL_PRIV
649  inode_lock(inode)
650  error等于security_path_chown(path, uid, gid)
651  如果非errorerror等于notify_change(dentry, & newattrs, & delegated_inode)
653  inode_unlock(inode)
654  如果delegated_inode
655  error等于break_deleg_wait( & delegated_inode)
656  如果非error则转到:retry_deleg
659  返回:error
调用者
名称描述
do_fchownat
ksys_fchown