• Home
  • Raw
  • Download

Lines Matching refs:ad

1552 	struct common_audit_data ad;  in cred_has_capability()  local
1559 ad.type = LSM_AUDIT_DATA_CAP; in cred_has_capability()
1560 ad.u.cap = cap; in cred_has_capability()
1578 int rc2 = avc_audit(sid, sid, sclass, av, &avd, rc, &ad); in cred_has_capability()
1625 struct common_audit_data ad; in dentry_has_perm() local
1627 ad.type = LSM_AUDIT_DATA_DENTRY; in dentry_has_perm()
1628 ad.u.dentry = dentry; in dentry_has_perm()
1629 return inode_has_perm(cred, inode, av, &ad); in dentry_has_perm()
1640 struct common_audit_data ad; in path_has_perm() local
1642 ad.type = LSM_AUDIT_DATA_PATH; in path_has_perm()
1643 ad.u.path = *path; in path_has_perm()
1644 return inode_has_perm(cred, inode, av, &ad); in path_has_perm()
1652 struct common_audit_data ad; in file_path_has_perm() local
1654 ad.type = LSM_AUDIT_DATA_PATH; in file_path_has_perm()
1655 ad.u.path = file->f_path; in file_path_has_perm()
1656 return inode_has_perm(cred, file_inode(file), av, &ad); in file_path_has_perm()
1673 struct common_audit_data ad; in file_has_perm() local
1677 ad.type = LSM_AUDIT_DATA_PATH; in file_has_perm()
1678 ad.u.path = file->f_path; in file_has_perm()
1684 &ad); in file_has_perm()
1692 rc = inode_has_perm(cred, inode, av, &ad); in file_has_perm()
1707 struct common_audit_data ad; in may_create() local
1716 ad.type = LSM_AUDIT_DATA_DENTRY; in may_create()
1717 ad.u.dentry = dentry; in may_create()
1721 &ad); in may_create()
1732 rc = avc_has_perm(sid, newsid, tclass, FILE__CREATE, &ad); in may_create()
1738 FILESYSTEM__ASSOCIATE, &ad); in may_create()
1761 struct common_audit_data ad; in may_link() local
1769 ad.type = LSM_AUDIT_DATA_DENTRY; in may_link()
1770 ad.u.dentry = dentry; in may_link()
1774 rc = avc_has_perm(sid, dsec->sid, SECCLASS_DIR, av, &ad); in may_link()
1794 rc = avc_has_perm(sid, isec->sid, isec->sclass, av, &ad); in may_link()
1804 struct common_audit_data ad; in may_rename() local
1815 ad.type = LSM_AUDIT_DATA_DENTRY; in may_rename()
1817 ad.u.dentry = old_dentry; in may_rename()
1819 DIR__REMOVE_NAME | DIR__SEARCH, &ad); in may_rename()
1823 old_isec->sclass, FILE__RENAME, &ad); in may_rename()
1828 old_isec->sclass, DIR__REPARENT, &ad); in may_rename()
1833 ad.u.dentry = new_dentry; in may_rename()
1837 rc = avc_has_perm(sid, new_dsec->sid, SECCLASS_DIR, av, &ad); in may_rename()
1845 (new_is_dir ? DIR__RMDIR : FILE__UNLINK), &ad); in may_rename()
1857 struct common_audit_data *ad) in superblock_has_perm() argument
1863 return avc_has_perm(sid, sbsec->sid, SECCLASS_FILESYSTEM, perms, ad); in superblock_has_perm()
1970 struct common_audit_data ad; in selinux_binder_transfer_file() local
1973 ad.type = LSM_AUDIT_DATA_PATH; in selinux_binder_transfer_file()
1974 ad.u.path = file->f_path; in selinux_binder_transfer_file()
1980 &ad); in selinux_binder_transfer_file()
1989 &ad); in selinux_binder_transfer_file()
2194 struct common_audit_data ad; in selinux_bprm_set_creds() local
2246 ad.type = LSM_AUDIT_DATA_PATH; in selinux_bprm_set_creds()
2247 ad.u.path = bprm->file->f_path; in selinux_bprm_set_creds()
2251 SECCLASS_FILE, FILE__EXECUTE_NO_TRANS, &ad); in selinux_bprm_set_creds()
2257 SECCLASS_PROCESS, PROCESS__TRANSITION, &ad); in selinux_bprm_set_creds()
2262 SECCLASS_FILE, FILE__ENTRYPOINT, &ad); in selinux_bprm_set_creds()
2663 struct common_audit_data ad; in selinux_sb_kern_mount() local
2674 ad.type = LSM_AUDIT_DATA_DENTRY; in selinux_sb_kern_mount()
2675 ad.u.dentry = sb->s_root; in selinux_sb_kern_mount()
2676 return superblock_has_perm(cred, sb, FILESYSTEM__MOUNT, &ad); in selinux_sb_kern_mount()
2682 struct common_audit_data ad; in selinux_sb_statfs() local
2684 ad.type = LSM_AUDIT_DATA_DENTRY; in selinux_sb_statfs()
2685 ad.u.dentry = dentry->d_sb->s_root; in selinux_sb_statfs()
2686 return superblock_has_perm(cred, dentry->d_sb, FILESYSTEM__GETATTR, &ad); in selinux_sb_statfs()
2878 struct common_audit_data ad; in audit_inode_permission() local
2882 ad.type = LSM_AUDIT_DATA_INODE; in audit_inode_permission()
2883 ad.u.inode = inode; in audit_inode_permission()
2886 audited, denied, result, &ad, flags); in audit_inode_permission()
2997 struct common_audit_data ad; in selinux_inode_setxattr() local
3011 ad.type = LSM_AUDIT_DATA_DENTRY; in selinux_inode_setxattr()
3012 ad.u.dentry = dentry; in selinux_inode_setxattr()
3015 FILE__RELABELFROM, &ad); in selinux_inode_setxattr()
3051 FILE__RELABELTO, &ad); in selinux_inode_setxattr()
3064 &ad); in selinux_inode_setxattr()
3251 struct common_audit_data ad; in ioctl_has_perm() local
3261 ad.type = LSM_AUDIT_DATA_IOCTL_OP; in ioctl_has_perm()
3262 ad.u.op = &ioctl; in ioctl_has_perm()
3263 ad.u.op->cmd = cmd; in ioctl_has_perm()
3264 ad.u.op->path = file->f_path; in ioctl_has_perm()
3270 &ad); in ioctl_has_perm()
3279 requested, driver, xperm, &ad); in ioctl_has_perm()
3658 struct common_audit_data ad; in selinux_kernel_module_request() local
3662 ad.type = LSM_AUDIT_DATA_KMOD; in selinux_kernel_module_request()
3663 ad.u.kmod_name = kmod_name; in selinux_kernel_module_request()
3666 SYSTEM__MODULE_REQUEST, &ad); in selinux_kernel_module_request()
3671 struct common_audit_data ad; in selinux_kernel_module_from_file() local
3684 ad.type = LSM_AUDIT_DATA_PATH; in selinux_kernel_module_from_file()
3685 ad.u.path = file->f_path; in selinux_kernel_module_from_file()
3692 rc = avc_has_perm(sid, fsec->sid, SECCLASS_FD, FD__USE, &ad); in selinux_kernel_module_from_file()
3698 SYSTEM__MODULE_LOAD, &ad); in selinux_kernel_module_from_file()
3819 struct common_audit_data *ad, u8 *proto) in selinux_parse_skb_ipv4() argument
3833 ad->u.net->v4info.saddr = ih->saddr; in selinux_parse_skb_ipv4()
3834 ad->u.net->v4info.daddr = ih->daddr; in selinux_parse_skb_ipv4()
3852 ad->u.net->sport = th->source; in selinux_parse_skb_ipv4()
3853 ad->u.net->dport = th->dest; in selinux_parse_skb_ipv4()
3868 ad->u.net->sport = uh->source; in selinux_parse_skb_ipv4()
3869 ad->u.net->dport = uh->dest; in selinux_parse_skb_ipv4()
3884 ad->u.net->sport = dh->dccph_sport; in selinux_parse_skb_ipv4()
3885 ad->u.net->dport = dh->dccph_dport; in selinux_parse_skb_ipv4()
3900 struct common_audit_data *ad, u8 *proto) in selinux_parse_skb_ipv6() argument
3912 ad->u.net->v6info.saddr = ip6->saddr; in selinux_parse_skb_ipv6()
3913 ad->u.net->v6info.daddr = ip6->daddr; in selinux_parse_skb_ipv6()
3933 ad->u.net->sport = th->source; in selinux_parse_skb_ipv6()
3934 ad->u.net->dport = th->dest; in selinux_parse_skb_ipv6()
3945 ad->u.net->sport = uh->source; in selinux_parse_skb_ipv6()
3946 ad->u.net->dport = uh->dest; in selinux_parse_skb_ipv6()
3957 ad->u.net->sport = dh->dccph_sport; in selinux_parse_skb_ipv6()
3958 ad->u.net->dport = dh->dccph_dport; in selinux_parse_skb_ipv6()
3972 static int selinux_parse_skb(struct sk_buff *skb, struct common_audit_data *ad, in selinux_parse_skb() argument
3978 switch (ad->u.net->family) { in selinux_parse_skb()
3980 ret = selinux_parse_skb_ipv4(skb, ad, proto); in selinux_parse_skb()
3983 addrp = (char *)(src ? &ad->u.net->v4info.saddr : in selinux_parse_skb()
3984 &ad->u.net->v4info.daddr); in selinux_parse_skb()
3989 ret = selinux_parse_skb_ipv6(skb, ad, proto); in selinux_parse_skb()
3992 addrp = (char *)(src ? &ad->u.net->v6info.saddr : in selinux_parse_skb()
3993 &ad->u.net->v6info.daddr); in selinux_parse_skb()
4094 struct common_audit_data ad; in sock_has_perm() local
4103 ad.type = LSM_AUDIT_DATA_NET; in sock_has_perm()
4104 ad.u.net = &net; in sock_has_perm()
4105 ad.u.net->sk = sk; in sock_has_perm()
4107 return avc_has_perm(tsid, sksec->sid, sksec->sclass, perms, &ad); in sock_has_perm()
4182 struct common_audit_data ad; in selinux_socket_bind() local
4209 ad.type = LSM_AUDIT_DATA_NET; in selinux_socket_bind()
4210 ad.u.net = &net; in selinux_socket_bind()
4211 ad.u.net->sport = htons(snum); in selinux_socket_bind()
4212 ad.u.net->family = family; in selinux_socket_bind()
4215 SOCKET__NAME_BIND, &ad); in selinux_socket_bind()
4243 ad.type = LSM_AUDIT_DATA_NET; in selinux_socket_bind()
4244 ad.u.net = &net; in selinux_socket_bind()
4245 ad.u.net->sport = htons(snum); in selinux_socket_bind()
4246 ad.u.net->family = family; in selinux_socket_bind()
4249 ad.u.net->v4info.saddr = addr4->sin_addr.s_addr; in selinux_socket_bind()
4251 ad.u.net->v6info.saddr = addr6->sin6_addr; in selinux_socket_bind()
4254 sksec->sclass, node_perm, &ad); in selinux_socket_bind()
4277 struct common_audit_data ad; in selinux_socket_connect() local
4303 ad.type = LSM_AUDIT_DATA_NET; in selinux_socket_connect()
4304 ad.u.net = &net; in selinux_socket_connect()
4305 ad.u.net->dport = htons(snum); in selinux_socket_connect()
4306 ad.u.net->family = sk->sk_family; in selinux_socket_connect()
4307 err = avc_has_perm(sksec->sid, sid, sksec->sclass, perm, &ad); in selinux_socket_connect()
4394 struct common_audit_data ad; in selinux_socket_unix_stream_connect() local
4398 ad.type = LSM_AUDIT_DATA_NET; in selinux_socket_unix_stream_connect()
4399 ad.u.net = &net; in selinux_socket_unix_stream_connect()
4400 ad.u.net->sk = other; in selinux_socket_unix_stream_connect()
4404 UNIX_STREAM_SOCKET__CONNECTTO, &ad); in selinux_socket_unix_stream_connect()
4426 struct common_audit_data ad; in selinux_socket_unix_may_send() local
4429 ad.type = LSM_AUDIT_DATA_NET; in selinux_socket_unix_may_send()
4430 ad.u.net = &net; in selinux_socket_unix_may_send()
4431 ad.u.net->sk = other->sk; in selinux_socket_unix_may_send()
4434 &ad); in selinux_socket_unix_may_send()
4439 struct common_audit_data *ad) in selinux_inet_sys_rcv_skb() argument
4449 SECCLASS_NETIF, NETIF__INGRESS, ad); in selinux_inet_sys_rcv_skb()
4457 SECCLASS_NODE, NODE__RECVFROM, ad); in selinux_inet_sys_rcv_skb()
4466 struct common_audit_data ad; in selinux_sock_rcv_skb_compat() local
4470 ad.type = LSM_AUDIT_DATA_NET; in selinux_sock_rcv_skb_compat()
4471 ad.u.net = &net; in selinux_sock_rcv_skb_compat()
4472 ad.u.net->netif = skb->skb_iif; in selinux_sock_rcv_skb_compat()
4473 ad.u.net->family = family; in selinux_sock_rcv_skb_compat()
4474 err = selinux_parse_skb(skb, &ad, &addrp, 1, NULL); in selinux_sock_rcv_skb_compat()
4480 PACKET__RECV, &ad); in selinux_sock_rcv_skb_compat()
4485 err = selinux_netlbl_sock_rcv_skb(sksec, skb, family, &ad); in selinux_sock_rcv_skb_compat()
4488 err = selinux_xfrm_sock_rcv_skb(sksec->sid, skb, &ad); in selinux_sock_rcv_skb_compat()
4499 struct common_audit_data ad; in selinux_socket_sock_rcv_skb() local
4524 ad.type = LSM_AUDIT_DATA_NET; in selinux_socket_sock_rcv_skb()
4525 ad.u.net = &net; in selinux_socket_sock_rcv_skb()
4526 ad.u.net->netif = skb->skb_iif; in selinux_socket_sock_rcv_skb()
4527 ad.u.net->family = family; in selinux_socket_sock_rcv_skb()
4528 err = selinux_parse_skb(skb, &ad, &addrp, 1, NULL); in selinux_socket_sock_rcv_skb()
4539 addrp, family, peer_sid, &ad); in selinux_socket_sock_rcv_skb()
4545 PEER__RECV, &ad); in selinux_socket_sock_rcv_skb()
4554 PACKET__RECV, &ad); in selinux_socket_sock_rcv_skb()
4885 struct common_audit_data ad; in selinux_ip_forward() local
4903 ad.type = LSM_AUDIT_DATA_NET; in selinux_ip_forward()
4904 ad.u.net = &net; in selinux_ip_forward()
4905 ad.u.net->netif = indev->ifindex; in selinux_ip_forward()
4906 ad.u.net->family = family; in selinux_ip_forward()
4907 if (selinux_parse_skb(skb, &ad, &addrp, 1, NULL) != 0) in selinux_ip_forward()
4912 addrp, family, peer_sid, &ad); in selinux_ip_forward()
4921 SECCLASS_PACKET, PACKET__FORWARD_IN, &ad)) in selinux_ip_forward()
5012 struct common_audit_data ad; in selinux_ip_postroute_compat() local
5021 ad.type = LSM_AUDIT_DATA_NET; in selinux_ip_postroute_compat()
5022 ad.u.net = &net; in selinux_ip_postroute_compat()
5023 ad.u.net->netif = ifindex; in selinux_ip_postroute_compat()
5024 ad.u.net->family = family; in selinux_ip_postroute_compat()
5025 if (selinux_parse_skb(skb, &ad, &addrp, 0, &proto)) in selinux_ip_postroute_compat()
5030 SECCLASS_PACKET, PACKET__SEND, &ad)) in selinux_ip_postroute_compat()
5033 if (selinux_xfrm_postroute_last(sksec->sid, skb, &ad, proto)) in selinux_ip_postroute_compat()
5047 struct common_audit_data ad; in selinux_ip_postroute() local
5142 ad.type = LSM_AUDIT_DATA_NET; in selinux_ip_postroute()
5143 ad.u.net = &net; in selinux_ip_postroute()
5144 ad.u.net->netif = ifindex; in selinux_ip_postroute()
5145 ad.u.net->family = family; in selinux_ip_postroute()
5146 if (selinux_parse_skb(skb, &ad, &addrp, 0, NULL)) in selinux_ip_postroute()
5151 SECCLASS_PACKET, secmark_perm, &ad)) in selinux_ip_postroute()
5161 SECCLASS_NETIF, NETIF__EGRESS, &ad)) in selinux_ip_postroute()
5167 SECCLASS_NODE, NODE__SENDTO, &ad)) in selinux_ip_postroute()
5259 struct common_audit_data ad; in ipc_has_perm() local
5264 ad.type = LSM_AUDIT_DATA_IPC; in ipc_has_perm()
5265 ad.u.ipc_id = ipc_perms->key; in ipc_has_perm()
5267 return avc_has_perm(sid, isec->sid, isec->sclass, perms, &ad); in ipc_has_perm()
5284 struct common_audit_data ad; in selinux_msg_queue_alloc_security() local
5294 ad.type = LSM_AUDIT_DATA_IPC; in selinux_msg_queue_alloc_security()
5295 ad.u.ipc_id = msq->q_perm.key; in selinux_msg_queue_alloc_security()
5298 MSGQ__CREATE, &ad); in selinux_msg_queue_alloc_security()
5314 struct common_audit_data ad; in selinux_msg_queue_associate() local
5319 ad.type = LSM_AUDIT_DATA_IPC; in selinux_msg_queue_associate()
5320 ad.u.ipc_id = msq->q_perm.key; in selinux_msg_queue_associate()
5323 MSGQ__ASSOCIATE, &ad); in selinux_msg_queue_associate()
5358 struct common_audit_data ad; in selinux_msg_queue_msgsnd() local
5379 ad.type = LSM_AUDIT_DATA_IPC; in selinux_msg_queue_msgsnd()
5380 ad.u.ipc_id = msq->q_perm.key; in selinux_msg_queue_msgsnd()
5384 MSGQ__WRITE, &ad); in selinux_msg_queue_msgsnd()
5388 MSG__SEND, &ad); in selinux_msg_queue_msgsnd()
5392 MSGQ__ENQUEUE, &ad); in selinux_msg_queue_msgsnd()
5403 struct common_audit_data ad; in selinux_msg_queue_msgrcv() local
5410 ad.type = LSM_AUDIT_DATA_IPC; in selinux_msg_queue_msgrcv()
5411 ad.u.ipc_id = msq->q_perm.key; in selinux_msg_queue_msgrcv()
5414 SECCLASS_MSGQ, MSGQ__READ, &ad); in selinux_msg_queue_msgrcv()
5417 SECCLASS_MSG, MSG__RECEIVE, &ad); in selinux_msg_queue_msgrcv()
5425 struct common_audit_data ad; in selinux_shm_alloc_security() local
5435 ad.type = LSM_AUDIT_DATA_IPC; in selinux_shm_alloc_security()
5436 ad.u.ipc_id = shp->shm_perm.key; in selinux_shm_alloc_security()
5439 SHM__CREATE, &ad); in selinux_shm_alloc_security()
5455 struct common_audit_data ad; in selinux_shm_associate() local
5460 ad.type = LSM_AUDIT_DATA_IPC; in selinux_shm_associate()
5461 ad.u.ipc_id = shp->shm_perm.key; in selinux_shm_associate()
5464 SHM__ASSOCIATE, &ad); in selinux_shm_associate()
5517 struct common_audit_data ad; in selinux_sem_alloc_security() local
5527 ad.type = LSM_AUDIT_DATA_IPC; in selinux_sem_alloc_security()
5528 ad.u.ipc_id = sma->sem_perm.key; in selinux_sem_alloc_security()
5531 SEM__CREATE, &ad); in selinux_sem_alloc_security()
5547 struct common_audit_data ad; in selinux_sem_associate() local
5552 ad.type = LSM_AUDIT_DATA_IPC; in selinux_sem_associate()
5553 ad.u.ipc_id = sma->sem_perm.key; in selinux_sem_associate()
5556 SEM__ASSOCIATE, &ad); in selinux_sem_associate()