函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sel_make_policycap

函数原型:static int sel_make_policycap(struct selinux_fs_info *fsi)

返回类型:int

参数:

类型参数名称
struct selinux_fs_info *fsi
1833  struct dentry * dentry = NULL
1834  struct inode * inode = NULL
1836  sel_remove_entries(policycap_dir)
1838 iter小于等于POLICYDB_CAPABILITY_MAX循环
1839  如果iter小于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(selinux_policycap_names)则dentry等于d_alloc_name(policycap_dir, selinux_policycap_names[iter])
1842  否则dentry等于d_alloc_name(policycap_dir, "unknown")
1845  如果(dentry == NULL)则返回:负ENOMEM
1848  inode等于sel_make_inode(sb, S_IFREG | 0444)
1849  如果(inode == NULL)则
1850  dput(dentry)
1851  返回:负ENOMEM
1854  rmer ->i_op->default_file_ops 等于sel_policycap_ops
1855  Stat data, not accessed from path walking 等于iter按位或SEL_POLICYCAP_INO_OFFSET
1856  添加目录项到哈希队列
1859  返回:0
调用者
名称描述
sel_make_policy_nodes