Lines Matching refs:ad

432 	struct smk_audit_info ad, *saip = NULL;  in smk_ptrace_rule_check()  local
438 smk_ad_init(&ad, func, LSM_AUDIT_DATA_TASK); in smk_ptrace_rule_check()
439 smk_ad_setfield_u_tsk(&ad, tracer); in smk_ptrace_rule_check()
440 saip = &ad; in smk_ptrace_rule_check()
896 struct smk_audit_info ad; in smack_sb_statfs() local
898 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_sb_statfs()
899 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_sb_statfs()
901 rc = smk_curacc(sbp->smk_floor, MAY_READ, &ad); in smack_sb_statfs()
1069 struct smk_audit_info ad; in smack_inode_link() local
1072 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_link()
1073 smk_ad_setfield_u_fs_path_dentry(&ad, old_dentry); in smack_inode_link()
1076 rc = smk_curacc(isp, MAY_WRITE, &ad); in smack_inode_link()
1081 smk_ad_setfield_u_fs_path_dentry(&ad, new_dentry); in smack_inode_link()
1082 rc = smk_curacc(isp, MAY_WRITE, &ad); in smack_inode_link()
1100 struct smk_audit_info ad; in smack_inode_unlink() local
1103 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_unlink()
1104 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_unlink()
1109 rc = smk_curacc(smk_of_inode(ip), MAY_WRITE, &ad); in smack_inode_unlink()
1115 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_INODE); in smack_inode_unlink()
1116 smk_ad_setfield_u_fs_inode(&ad, dir); in smack_inode_unlink()
1117 rc = smk_curacc(smk_of_inode(dir), MAY_WRITE, &ad); in smack_inode_unlink()
1133 struct smk_audit_info ad; in smack_inode_rmdir() local
1136 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_rmdir()
1137 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_rmdir()
1142 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_rmdir()
1148 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_INODE); in smack_inode_rmdir()
1149 smk_ad_setfield_u_fs_inode(&ad, dir); in smack_inode_rmdir()
1150 rc = smk_curacc(smk_of_inode(dir), MAY_WRITE, &ad); in smack_inode_rmdir()
1176 struct smk_audit_info ad; in smack_inode_rename() local
1178 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_rename()
1179 smk_ad_setfield_u_fs_path_dentry(&ad, old_dentry); in smack_inode_rename()
1182 rc = smk_curacc(isp, MAY_READWRITE, &ad); in smack_inode_rename()
1187 smk_ad_setfield_u_fs_path_dentry(&ad, new_dentry); in smack_inode_rename()
1188 rc = smk_curacc(isp, MAY_READWRITE, &ad); in smack_inode_rename()
1206 struct smk_audit_info ad; in smack_inode_permission() local
1225 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_INODE); in smack_inode_permission()
1226 smk_ad_setfield_u_fs_inode(&ad, inode); in smack_inode_permission()
1227 rc = smk_curacc(smk_of_inode(inode), mask, &ad); in smack_inode_permission()
1241 struct smk_audit_info ad; in smack_inode_setattr() local
1249 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_setattr()
1250 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_setattr()
1252 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_setattr()
1265 struct smk_audit_info ad; in smack_inode_getattr() local
1269 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_inode_getattr()
1270 smk_ad_setfield_u_fs_path(&ad, *path); in smack_inode_getattr()
1271 rc = smk_curacc(smk_of_inode(inode), MAY_READ, &ad); in smack_inode_getattr()
1293 struct smk_audit_info ad; in smack_inode_setxattr() local
1333 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_setxattr()
1334 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_setxattr()
1337 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_setxattr()
1392 struct smk_audit_info ad; in smack_inode_getxattr() local
1395 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_getxattr()
1396 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_getxattr()
1398 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_READ, &ad); in smack_inode_getxattr()
1417 struct smk_audit_info ad; in smack_inode_removexattr() local
1434 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_removexattr()
1435 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_removexattr()
1437 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_removexattr()
1476 struct smk_audit_info ad; in smack_inode_set_acl() local
1479 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_set_acl()
1480 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_set_acl()
1482 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_set_acl()
1498 struct smk_audit_info ad; in smack_inode_get_acl() local
1501 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_get_acl()
1502 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_get_acl()
1504 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_READ, &ad); in smack_inode_get_acl()
1520 struct smk_audit_info ad; in smack_inode_remove_acl() local
1523 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_remove_acl()
1524 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_remove_acl()
1526 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_remove_acl()
1677 struct smk_audit_info ad; in smack_file_ioctl() local
1683 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_ioctl()
1684 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_ioctl()
1687 rc = smk_curacc(smk_of_inode(inode), MAY_WRITE, &ad); in smack_file_ioctl()
1692 rc = smk_curacc(smk_of_inode(inode), MAY_READ, &ad); in smack_file_ioctl()
1708 struct smk_audit_info ad; in smack_file_lock() local
1715 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_lock()
1716 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_lock()
1717 rc = smk_curacc(smk_of_inode(inode), MAY_LOCK, &ad); in smack_file_lock()
1737 struct smk_audit_info ad; in smack_file_fcntl() local
1749 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_fcntl()
1750 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_fcntl()
1751 rc = smk_curacc(smk_of_inode(inode), MAY_LOCK, &ad); in smack_file_fcntl()
1756 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_fcntl()
1757 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_fcntl()
1758 rc = smk_curacc(smk_of_inode(inode), MAY_WRITE, &ad); in smack_file_fcntl()
1913 struct smk_audit_info ad; in smack_file_send_sigiotask() local
1932 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); in smack_file_send_sigiotask()
1933 smk_ad_setfield_u_tsk(&ad, tsk); in smack_file_send_sigiotask()
1934 smack_log(skp->smk_known, tkp->smk_known, MAY_DELIVER, rc, &ad); in smack_file_send_sigiotask()
1948 struct smk_audit_info ad; in smack_file_receive() local
1957 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_receive()
1958 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_receive()
1970 rc = smk_access(tsp->smk_task, ssp->smk_out, MAY_WRITE, &ad); in smack_file_receive()
1974 rc = smk_access(ssp->smk_in, tsp->smk_task, MAY_WRITE, &ad); in smack_file_receive()
1986 rc = smk_curacc(smk_of_inode(inode), may, &ad); in smack_file_receive()
2006 struct smk_audit_info ad; in smack_file_open() local
2009 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_open()
2010 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_open()
2011 rc = smk_tskacc(tsp, smk_of_inode(inode), MAY_READ, &ad); in smack_file_open()
2166 struct smk_audit_info ad; in smk_curacc_on_task() local
2170 smk_ad_init(&ad, caller, LSM_AUDIT_DATA_TASK); in smk_curacc_on_task()
2171 smk_ad_setfield_u_tsk(&ad, p); in smk_curacc_on_task()
2172 rc = smk_curacc(skp, access, &ad); in smk_curacc_on_task()
2319 struct smk_audit_info ad; in smack_task_kill() local
2327 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); in smack_task_kill()
2328 smk_ad_setfield_u_tsk(&ad, p); in smack_task_kill()
2334 rc = smk_curacc(tkp, MAY_DELIVER, &ad); in smack_task_kill()
2344 rc = smk_access(skp, tkp, MAY_DELIVER, &ad); in smack_task_kill()
2621 struct smk_audit_info ad; in smk_ipv4_check() local
2629 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smk_ipv4_check()
2630 ad.a.u.net->family = sap->sin_family; in smk_ipv4_check()
2631 ad.a.u.net->dport = sap->sin_port; in smk_ipv4_check()
2632 ad.a.u.net->v4info.daddr = sap->sin_addr.s_addr; in smk_ipv4_check()
2635 rc = smk_access(skp, hkp, MAY_WRITE, &ad); in smk_ipv4_check()
2664 struct smk_audit_info ad; in smk_ipv6_check() local
2668 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smk_ipv6_check()
2669 ad.a.u.net->family = PF_INET6; in smk_ipv6_check()
2670 ad.a.u.net->dport = address->sin6_port; in smk_ipv6_check()
2672 ad.a.u.net->v6info.saddr = address->sin6_addr; in smk_ipv6_check()
2674 ad.a.u.net->v6info.daddr = address->sin6_addr; in smk_ipv6_check()
2676 rc = smk_access(subject, object, MAY_WRITE, &ad); in smk_ipv6_check()
3100 struct smk_audit_info ad; in smk_curacc_shm() local
3104 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC); in smk_curacc_shm()
3105 ad.a.u.ipc_id = isp->id; in smk_curacc_shm()
3107 rc = smk_curacc(ssp, access, &ad); in smk_curacc_shm()
3189 struct smk_audit_info ad; in smk_curacc_sem() local
3193 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC); in smk_curacc_sem()
3194 ad.a.u.ipc_id = isp->id; in smk_curacc_sem()
3196 rc = smk_curacc(ssp, access, &ad); in smk_curacc_sem()
3284 struct smk_audit_info ad; in smk_curacc_msq() local
3288 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC); in smk_curacc_msq()
3289 ad.a.u.ipc_id = isp->id; in smk_curacc_msq()
3291 rc = smk_curacc(msp, access, &ad); in smk_curacc_msq()
3392 struct smk_audit_info ad; in smack_ipc_permission() local
3396 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC); in smack_ipc_permission()
3397 ad.a.u.ipc_id = ipp->id; in smack_ipc_permission()
3399 rc = smk_curacc(iskp, may, &ad); in smack_ipc_permission()
3738 struct smk_audit_info ad; in smack_unix_stream_connect() local
3748 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_unix_stream_connect()
3749 smk_ad_setfield_u_net_sk(&ad, other); in smack_unix_stream_connect()
3751 rc = smk_access(skp, okp, MAY_WRITE, &ad); in smack_unix_stream_connect()
3756 rc = smk_access(okp, skp, MAY_WRITE, &ad); in smack_unix_stream_connect()
3785 struct smk_audit_info ad; in smack_unix_may_send() local
3791 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_unix_may_send()
3792 smk_ad_setfield_u_net_sk(&ad, other->sk); in smack_unix_may_send()
3798 rc = smk_access(ssp->smk_out, osp->smk_in, MAY_WRITE, &ad); in smack_unix_may_send()
4058 struct smk_audit_info ad; in smack_socket_sock_rcv_skb() local
4086 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_socket_sock_rcv_skb()
4087 ad.a.u.net->family = family; in smack_socket_sock_rcv_skb()
4088 ad.a.u.net->netif = skb->skb_iif; in smack_socket_sock_rcv_skb()
4089 ipv4_skb_to_auditdata(skb, &ad.a, NULL); in smack_socket_sock_rcv_skb()
4097 rc = smk_access(skp, ssp->smk_in, MAY_WRITE, &ad); in smack_socket_sock_rcv_skb()
4119 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_socket_sock_rcv_skb()
4120 ad.a.u.net->family = family; in smack_socket_sock_rcv_skb()
4121 ad.a.u.net->netif = skb->skb_iif; in smack_socket_sock_rcv_skb()
4122 ipv6_skb_to_auditdata(skb, &ad.a, NULL); in smack_socket_sock_rcv_skb()
4124 rc = smk_access(skp, ssp->smk_in, MAY_WRITE, &ad); in smack_socket_sock_rcv_skb()
4283 struct smk_audit_info ad; in smack_inet_conn_request() local
4315 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_inet_conn_request()
4316 ad.a.u.net->family = family; in smack_inet_conn_request()
4317 ad.a.u.net->netif = skb->skb_iif; in smack_inet_conn_request()
4318 ipv4_skb_to_auditdata(skb, &ad.a, NULL); in smack_inet_conn_request()
4324 rc = smk_access(skp, ssp->smk_in, MAY_WRITE, &ad); in smack_inet_conn_request()
4427 struct smk_audit_info ad; in smack_key_permission() local
4475 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_KEY); in smack_key_permission()
4476 ad.a.u.key_struct.key = keyp->serial; in smack_key_permission()
4477 ad.a.u.key_struct.key_desc = keyp->description; in smack_key_permission()
4479 rc = smk_access(tkp, keyp->security, request, &ad); in smack_key_permission()
4524 struct smk_audit_info ad; in smack_watch_key() local
4546 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_KEY); in smack_watch_key()
4547 ad.a.u.key_struct.key = key->serial; in smack_watch_key()
4548 ad.a.u.key_struct.key_desc = key->description; in smack_watch_key()
4550 rc = smk_access(tkp, key->security, MAY_READ, &ad); in smack_watch_key()
4568 struct smk_audit_info ad; in smack_post_notification() local
4581 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NOTIFICATION); in smack_post_notification()
4582 rc = smk_access(subj, obj, MAY_WRITE, &ad); in smack_post_notification()
4905 struct smk_audit_info ad; in smack_uring_cmd() local
4916 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_uring_cmd()
4917 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_uring_cmd()
4918 rc = smk_tskacc(tsp, smk_of_inode(inode), MAY_READ, &ad); in smack_uring_cmd()