Lines Matching defs:dentry
966 * security_quota_on() - Check if QUOTAON is allowed for a dentry
967 * @dentry: dentry
969 * Check whether QUOTAON is allowed for @dentry.
973 int security_quota_on(struct dentry *dentry)
975 return call_int_hook(quota_on, 0, dentry);
1145 * @reference: dentry reference for submount/remount
1343 * @dentry: superblock handle
1346 * mountpoint. @dentry is a handle on the superblock for the filesystem.
1350 int security_sb_statfs(struct dentry *dentry)
1352 return call_int_hook(sb_statfs, 0, dentry);
1537 * security_dentry_init_security() - Perform dentry initialization
1538 * @dentry: the dentry to initialize
1545 * Compute a context for a dentry as the inode is not yet available since NFSv4
1551 int security_dentry_init_security(struct dentry *dentry, int mode,
1564 rc = hp->hook.dentry_init_security(dentry, mode, name,
1574 * security_dentry_create_files_as() - Perform dentry initialization
1575 * @dentry: the dentry to initialize
1581 * Compute a context for a dentry as the inode is not yet available and set
1588 int security_dentry_create_files_as(struct dentry *dentry, int mode,
1592 return call_int_hook(dentry_create_files_as, 0, dentry, mode,
1701 * @dentry: new file
1710 int security_path_mknod(const struct path *dir, struct dentry *dentry,
1713 if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry))))
1715 return call_int_hook(path_mknod, 0, dir, dentry, mode, dev);
1722 * @dentry: new directory
1729 int security_path_mkdir(const struct path *dir, struct dentry *dentry,
1732 if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry))))
1734 return call_int_hook(path_mkdir, 0, dir, dentry, mode);
1741 * @dentry: directory to remove
1747 int security_path_rmdir(const struct path *dir, struct dentry *dentry)
1749 if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry))))
1751 return call_int_hook(path_rmdir, 0, dir, dentry);
1757 * @dentry: file
1763 int security_path_unlink(const struct path *dir, struct dentry *dentry)
1765 if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry))))
1767 return call_int_hook(path_unlink, 0, dir, dentry);
1774 * @dentry: symbolic link
1781 int security_path_symlink(const struct path *dir, struct dentry *dentry,
1784 if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry))))
1786 return call_int_hook(path_symlink, 0, dir, dentry, old_name);
1799 int security_path_link(struct dentry *old_dentry, const struct path *new_dir,
1800 struct dentry *new_dentry)
1819 int security_path_rename(const struct path *old_dir, struct dentry *old_dentry,
1820 const struct path *new_dir, struct dentry *new_dentry,
1845 if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry))))
1863 if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry))))
1880 if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry))))
1902 * @dentry: the file being created
1909 int security_inode_create(struct inode *dir, struct dentry *dentry,
1914 return call_int_hook(inode_create, 0, dir, dentry, mode);
1928 int security_inode_link(struct dentry *old_dentry, struct inode *dir,
1929 struct dentry *new_dentry)
1939 * @dentry: file
1945 int security_inode_unlink(struct inode *dir, struct dentry *dentry)
1947 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
1949 return call_int_hook(inode_unlink, 0, dir, dentry);
1955 * @dentry: symbolic link
1962 int security_inode_symlink(struct inode *dir, struct dentry *dentry,
1967 return call_int_hook(inode_symlink, 0, dir, dentry, old_name);
1973 * @dentry: new directory
1981 int security_inode_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
1985 return call_int_hook(inode_mkdir, 0, dir, dentry, mode);
1992 * @dentry: directory to be removed
1998 int security_inode_rmdir(struct inode *dir, struct dentry *dentry)
2000 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2002 return call_int_hook(inode_rmdir, 0, dir, dentry);
2008 * @dentry: new file
2019 int security_inode_mknod(struct inode *dir, struct dentry *dentry,
2024 return call_int_hook(inode_mknod, 0, dir, dentry, mode, dev);
2039 int security_inode_rename(struct inode *old_dir, struct dentry *old_dentry,
2040 struct inode *new_dir, struct dentry *new_dentry,
2061 * @dentry: link
2067 int security_inode_readlink(struct dentry *dentry)
2069 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2071 return call_int_hook(inode_readlink, 0, dentry);
2076 * @dentry: link dentry
2085 int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
2090 return call_int_hook(inode_follow_link, 0, dentry, inode, rcu);
2117 * @dentry: file
2128 struct dentry *dentry, struct iattr *attr)
2132 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2134 ret = call_int_hook(inode_setattr, 0, dentry, attr);
2137 return evm_inode_setattr(idmap, dentry, attr);
2151 if (unlikely(IS_PRIVATE(d_backing_inode(path->dentry))))
2159 * @dentry: file
2170 struct dentry *dentry, const char *name,
2175 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2181 ret = call_int_hook(inode_setxattr, 1, idmap, dentry, name, value,
2185 ret = cap_inode_setxattr(dentry, name, value, size, flags);
2188 ret = ima_inode_setxattr(dentry, name, value, size);
2191 return evm_inode_setxattr(idmap, dentry, name, value, size);
2197 * @dentry: file
2207 struct dentry *dentry, const char *acl_name,
2212 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2214 ret = call_int_hook(inode_set_acl, 0, idmap, dentry, acl_name,
2218 ret = ima_inode_set_acl(idmap, dentry, acl_name, kacl);
2221 return evm_inode_set_acl(idmap, dentry, acl_name, kacl);
2227 * @dentry: file
2236 struct dentry *dentry, const char *acl_name)
2238 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2240 return call_int_hook(inode_get_acl, 0, idmap, dentry, acl_name);
2246 * @dentry: file
2255 struct dentry *dentry, const char *acl_name)
2259 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2261 ret = call_int_hook(inode_remove_acl, 0, idmap, dentry, acl_name);
2264 ret = ima_inode_remove_acl(idmap, dentry, acl_name);
2267 return evm_inode_remove_acl(idmap, dentry, acl_name);
2272 * @dentry: file
2280 void security_inode_post_setxattr(struct dentry *dentry, const char *name,
2283 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2285 call_void_hook(inode_post_setxattr, dentry, name, value, size, flags);
2286 evm_inode_post_setxattr(dentry, name, value, size);
2291 * @dentry: file
2295 * @name for @dentry.
2299 int security_inode_getxattr(struct dentry *dentry, const char *name)
2301 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2303 return call_int_hook(inode_getxattr, 0, dentry, name);
2308 * @dentry: file
2311 * @dentry.
2315 int security_inode_listxattr(struct dentry *dentry)
2317 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2319 return call_int_hook(inode_listxattr, 0, dentry);
2325 * @dentry: file
2329 * for @dentry.
2334 struct dentry *dentry, const char *name)
2338 if (unlikely(IS_PRIVATE(d_backing_inode(dentry))))
2344 ret = call_int_hook(inode_removexattr, 1, idmap, dentry, name);
2346 ret = cap_inode_removexattr(idmap, dentry, name);
2349 ret = ima_inode_removexattr(dentry, name);
2352 return evm_inode_removexattr(idmap, dentry, name);
2357 * @dentry: associated dentry
2366 int security_inode_need_killpriv(struct dentry *dentry)
2368 return call_int_hook(inode_need_killpriv, 0, dentry);
2374 * @dentry: associated dentry
2376 * The @dentry's setuid bit is being removed. Remove similar security labels.
2377 * Called with the dentry->d_inode->i_mutex held.
2383 struct dentry *dentry)
2385 return call_int_hook(inode_killpriv, 0, idmap, dentry);
2497 * @src: union dentry of copy-up file
2507 int security_inode_copy_up(struct dentry *src, struct cred **new)
3807 * security_d_instantiate() - Populate an inode's LSM state based on a dentry
3808 * @dentry: dentry
3811 * Fill in @inode security information for a @dentry if allowed.
3813 void security_d_instantiate(struct dentry *dentry, struct inode *inode)
3817 call_void_hook(d_instantiate, dentry, inode);
4000 * @dentry: inode
4014 int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen)
4016 return call_int_hook(inode_setsecctx, 0, dentry, ctx, ctxlen);