函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:kernel\capability.c Create Date:2022-07-27 10:12:25
首页 Copyright©Brick

479
480
481
482
483
484
485
486
487
488
489
490
/**
 * privileged_wrt_inode_uidgid - Do capabilities in the namespace work over the inode?
 * @ns: The user namespace in question
 * @inode: The inode in question
 *
 * Return true if the inode uid and gid are within the namespace.
 */
bool privileged_wrt_inode_uidgid(struct user_namespace *ns, const struct inode *inode)
{
    return kuid_has_mapping(ns, inode->i_uid) &&
        kgid_has_mapping(ns, inode->i_gid);
}