15 static int cap_syslog(
int type)
30 static int cap_bprm_check_security(
struct linux_binprm *bprm)
35 static void cap_bprm_committing_creds(
struct linux_binprm *bprm)
39 static void cap_bprm_committed_creds(
struct linux_binprm *bprm)
52 static int cap_sb_copy_data(
char *orig,
char *copy)
77 static int cap_sb_mount(
const char *dev_name,
struct path *
path,
88 static int cap_sb_pivotroot(
struct path *old_path,
struct path *new_path)
101 static void cap_sb_clone_mnt_opts(
const struct super_block *oldsb,
111 static int cap_inode_alloc_security(
struct inode *
inode)
116 static void cap_inode_free_security(
struct inode *
inode)
120 static int cap_inode_init_security(
struct inode *
inode,
struct inode *dir,
122 void **
value,
size_t *len)
134 struct dentry *new_dentry)
167 static int cap_inode_rename(
struct inode *old_inode,
struct dentry *old_dentry,
199 static void cap_inode_post_setxattr(
struct dentry *
dentry,
const char *
name,
214 static int cap_inode_getsecurity(
const struct inode *
inode,
const char *
name,
215 void **
buffer,
bool alloc)
220 static int cap_inode_setsecurity(
struct inode *
inode,
const char *
name,
232 static void cap_inode_getsecid(
const struct inode *
inode,
u32 *secid)
237 #ifdef CONFIG_SECURITY_PATH
260 const char *old_name)
265 static int cap_path_link(
struct dentry *old_dentry,
struct path *new_dir,
266 struct dentry *new_dentry)
271 static int cap_path_rename(
struct path *old_path,
struct dentry *old_dentry,
272 struct path *new_path,
struct dentry *new_dentry)
277 static int cap_path_truncate(
struct path *
path)
292 static int cap_path_chroot(
struct path *root)
298 static int cap_file_permission(
struct file *
file,
int mask)
303 static int cap_file_alloc_security(
struct file *
file)
308 static void cap_file_free_security(
struct file *
file)
318 static int cap_file_mprotect(
struct vm_area_struct *vma,
unsigned long reqprot,
324 static int cap_file_lock(
struct file *
file,
unsigned int cmd)
329 static int cap_file_fcntl(
struct file *
file,
unsigned int cmd,
335 static int cap_file_set_fowner(
struct file *
file)
346 static int cap_file_receive(
struct file *
file)
356 static int cap_task_create(
unsigned long clone_flags)
365 static int cap_cred_alloc_blank(
struct cred *
cred,
gfp_t gfp)
370 static void cap_cred_free(
struct cred *
cred)
374 static int cap_cred_prepare(
struct cred *
new,
const struct cred *old,
gfp_t gfp)
379 static void cap_cred_transfer(
struct cred *
new,
const struct cred *old)
383 static int cap_kernel_act_as(
struct cred *
new,
u32 secid)
388 static int cap_kernel_create_files_as(
struct cred *
new,
struct inode *
inode)
393 static int cap_kernel_module_request(
char *kmod_name)
464 static int cap_msg_msg_alloc_security(
struct msg_msg *
msg)
469 static void cap_msg_msg_free_security(
struct msg_msg *
msg)
473 static int cap_msg_queue_alloc_security(
struct msg_queue *msq)
478 static void cap_msg_queue_free_security(
struct msg_queue *msq)
482 static int cap_msg_queue_associate(
struct msg_queue *msq,
int msqflg)
487 static int cap_msg_queue_msgctl(
struct msg_queue *msq,
int cmd)
504 static int cap_shm_alloc_security(
struct shmid_kernel *shp)
509 static void cap_shm_free_security(
struct shmid_kernel *shp)
513 static int cap_shm_associate(
struct shmid_kernel *shp,
int shmflg)
523 static int cap_shm_shmat(
struct shmid_kernel *shp,
char __user *shmaddr,
529 static int cap_sem_alloc_security(
struct sem_array *sma)
534 static void cap_sem_free_security(
struct sem_array *sma)
538 static int cap_sem_associate(
struct sem_array *sma,
int semflg)
543 static int cap_sem_semctl(
struct sem_array *sma,
int cmd)
549 unsigned nsops,
int alter)
554 #ifdef CONFIG_SECURITY_NETWORK
555 static int cap_unix_stream_connect(
struct sock *
sock,
struct sock *
other,
610 static int cap_socket_getsockname(
struct socket *
sock)
615 static int cap_socket_getpeername(
struct socket *
sock)
620 static int cap_socket_setsockopt(
struct socket *
sock,
int level,
int optname)
625 static int cap_socket_getsockopt(
struct socket *
sock,
int level,
int optname)
630 static int cap_socket_shutdown(
struct socket *
sock,
int how)
640 static int cap_socket_getpeersec_stream(
struct socket *
sock,
642 int __user *optlen,
unsigned len)
647 static int cap_socket_getpeersec_dgram(
struct socket *
sock,
658 static void cap_sk_free_security(
struct sock *
sk)
662 static void cap_sk_clone_security(
const struct sock *
sk,
struct sock *newsk)
666 static void cap_sk_getsecid(
struct sock *
sk,
u32 *secid)
670 static void cap_sock_graft(
struct sock *
sk,
struct socket *parent)
680 static void cap_inet_csk_clone(
struct sock *newsk,
689 static int cap_secmark_relabel_packet(
u32 secid)
694 static void cap_secmark_refcount_inc(
void)
698 static void cap_secmark_refcount_dec(
void)
707 static int cap_tun_dev_create(
void)
712 static void cap_tun_dev_post_create(
struct sock *
sk)
716 static int cap_tun_dev_attach(
struct sock *
sk)
722 #ifdef CONFIG_SECURITY_NETWORK_XFRM
723 static int cap_xfrm_policy_alloc_security(
struct xfrm_sec_ctx **ctxp,
729 static int cap_xfrm_policy_clone_security(
struct xfrm_sec_ctx *old_ctx,
744 static int cap_xfrm_state_alloc_security(
struct xfrm_state *
x,
751 static void cap_xfrm_state_free_security(
struct xfrm_state *
x)
755 static int cap_xfrm_state_delete_security(
struct xfrm_state *
x)
765 static int cap_xfrm_state_pol_flow_match(
struct xfrm_state *
x,
772 static int cap_xfrm_decode_session(
struct sk_buff *
skb,
u32 *
fl,
int ckall)
793 static int cap_secid_to_secctx(
u32 secid,
char **secdata,
u32 *seclen)
798 static int cap_secctx_to_secid(
const char *secdata,
u32 seclen,
u32 *secid)
804 static void cap_release_secctx(
char *secdata,
u32 seclen)
808 static int cap_inode_notifysecctx(
struct inode *
inode,
void *
ctx,
u32 ctxlen)
818 static int cap_inode_getsecctx(
struct inode *
inode,
void **
ctx,
u32 *ctxlen)
823 static int cap_key_alloc(
struct key *
key,
const struct cred *
cred,
829 static void cap_key_free(
struct key *
key)
833 static int cap_key_permission(key_ref_t key_ref,
const struct cred *
cred,
839 static int cap_key_getsecurity(
struct key *
key,
char **
_buffer)
848 static int cap_audit_rule_init(
u32 field,
u32 op,
char *rulestr,
void **lsmrule)
853 static int cap_audit_rule_known(
struct audit_krule *krule)
858 static int cap_audit_rule_match(
u32 secid,
u32 field,
u32 op,
void *lsmrule,
864 static void cap_audit_rule_free(
void *lsmrule)
869 #define set_to_cap_if_null(ops, function) \
871 if (!ops->function) { \
872 ops->function = cap_##function; \
873 pr_debug("Had to override the " #function \
874 " security operation with the default.\n");\
935 #ifdef CONFIG_SECURITY_PATH
1016 #ifdef CONFIG_SECURITY_NETWORK
1051 #ifdef CONFIG_SECURITY_NETWORK_XFRM