#ifndef _LSM_H_ #define _LSM_H_ #include "lve_kmod_c.h" /** * lsm hooks */ extern int (*lve___ptrace_may_access)(struct task_struct *child, unsigned int mode); extern int (*lve_security_ptrace_traceme)(struct task_struct *parent); extern int (*lve_security_task_fix_setuid)(struct cred *new, const struct cred *old, int flags); #if FEAT_LINK_PROT == 1 #if defined(IMPL_LINK_PROT_NEW) || defined(IMPL_LINK_PROT_EXPERIMENTAL) extern int (*lve_security_inode_follow_link)(struct dentry *, struct inode *, bool); extern int (*lve_security_path_symlink)(const struct path *dir, struct dentry *dentry, const char *old_name); #else extern int (*lve_security_path_symlink)(struct path *dir, struct dentry *dentry, const char *old_name); extern int (*lve_security_inode_follow_link)(struct dentry *link_dentry, struct nameidata *nd_orig); #endif #endif extern int (*lve_security_inode_permission)(struct inode *inode, int mask); extern int (*lve_security_inode_readlink)(struct dentry *link_dentry, struct vfsmount *link_mnt); extern void (*lve_security_d_instantiate)(struct dentry *de, struct inode *inode); struct socket; struct sockaddr; /* network hooks */ extern int (*lve_security_socket_bind)(struct socket *sock, struct sockaddr *address, int addrlen); #endif