#ifndef _LSM_INT_H_ #define _LSM_INT_H_ /** * lsm hooks */ extern gid_t proc_super_gid; int sandbox_permission(struct inode *inode, int mask); extern int user_ptrace_enabled; extern int user_ptrace_self_enabled; int sandbox_ptrace_access(struct task_struct *child, unsigned int mode); int sandbox_ptrace_traceme(struct task_struct *parent); int sandbox_inode_rmdir(struct inode *dir, struct dentry *dentry); int sandbox_inode_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry); int sandbox_task_fix_setuid(struct cred *new, const struct cred *old, int flags); #if defined(IMPL_LINK_PROT_NEW) || defined(IMPL_LINK_PROT_EXPERIMENTAL) int sandbox_inode_follow_link(struct dentry *, struct inode *, bool); int sandbox_path_symlink(const struct path *dir, struct dentry *dentry, const char *old_name); int sandbox_inode_permission(struct inode *inode, int mask); #else int sandbox_path_symlink(struct path *dir, struct dentry *dentry, const char *old_name); int sandbox_inode_follow_link(struct dentry *link_dentry, struct nameidata *nd_orig); #endif void sandbox_d_instantiate(struct dentry *de, struct inode *inode); int sandbox_inode_readlink(struct dentry *link_dentry, struct vfsmount *link_mnt); struct socket; struct sockaddr; /* network hooks */ int sandbox_socket_bind(struct socket *sock, struct sockaddr *address, int addrlen); #endif