Lines Matching refs:ad
420 struct smk_audit_info ad, *saip = NULL; in smk_ptrace_rule_check() local
426 smk_ad_init(&ad, func, LSM_AUDIT_DATA_TASK); in smk_ptrace_rule_check()
427 smk_ad_setfield_u_tsk(&ad, tracer); in smk_ptrace_rule_check()
428 saip = &ad; in smk_ptrace_rule_check()
859 struct smk_audit_info ad; in smack_sb_statfs() local
861 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_sb_statfs()
862 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_sb_statfs()
864 rc = smk_curacc(sbp->smk_floor, MAY_READ, &ad); in smack_sb_statfs()
1022 struct smk_audit_info ad; in smack_inode_link() local
1025 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_link()
1026 smk_ad_setfield_u_fs_path_dentry(&ad, old_dentry); in smack_inode_link()
1029 rc = smk_curacc(isp, MAY_WRITE, &ad); in smack_inode_link()
1034 smk_ad_setfield_u_fs_path_dentry(&ad, new_dentry); in smack_inode_link()
1035 rc = smk_curacc(isp, MAY_WRITE, &ad); in smack_inode_link()
1053 struct smk_audit_info ad; in smack_inode_unlink() local
1056 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_unlink()
1057 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_unlink()
1062 rc = smk_curacc(smk_of_inode(ip), MAY_WRITE, &ad); in smack_inode_unlink()
1068 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_INODE); in smack_inode_unlink()
1069 smk_ad_setfield_u_fs_inode(&ad, dir); in smack_inode_unlink()
1070 rc = smk_curacc(smk_of_inode(dir), MAY_WRITE, &ad); in smack_inode_unlink()
1086 struct smk_audit_info ad; in smack_inode_rmdir() local
1089 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_rmdir()
1090 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_rmdir()
1095 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_rmdir()
1101 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_INODE); in smack_inode_rmdir()
1102 smk_ad_setfield_u_fs_inode(&ad, dir); in smack_inode_rmdir()
1103 rc = smk_curacc(smk_of_inode(dir), MAY_WRITE, &ad); in smack_inode_rmdir()
1129 struct smk_audit_info ad; in smack_inode_rename() local
1131 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_rename()
1132 smk_ad_setfield_u_fs_path_dentry(&ad, old_dentry); in smack_inode_rename()
1135 rc = smk_curacc(isp, MAY_READWRITE, &ad); in smack_inode_rename()
1140 smk_ad_setfield_u_fs_path_dentry(&ad, new_dentry); in smack_inode_rename()
1141 rc = smk_curacc(isp, MAY_READWRITE, &ad); in smack_inode_rename()
1159 struct smk_audit_info ad; in smack_inode_permission() local
1178 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_INODE); in smack_inode_permission()
1179 smk_ad_setfield_u_fs_inode(&ad, inode); in smack_inode_permission()
1180 rc = smk_curacc(smk_of_inode(inode), mask, &ad); in smack_inode_permission()
1194 struct smk_audit_info ad; in smack_inode_setattr() local
1202 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_setattr()
1203 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_setattr()
1205 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_setattr()
1218 struct smk_audit_info ad; in smack_inode_getattr() local
1222 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_inode_getattr()
1223 smk_ad_setfield_u_fs_path(&ad, *path); in smack_inode_getattr()
1224 rc = smk_curacc(smk_of_inode(inode), MAY_READ, &ad); in smack_inode_getattr()
1245 struct smk_audit_info ad; in smack_inode_setxattr() local
1285 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_setxattr()
1286 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_setxattr()
1289 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_setxattr()
1344 struct smk_audit_info ad; in smack_inode_getxattr() local
1347 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_getxattr()
1348 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_getxattr()
1350 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_READ, &ad); in smack_inode_getxattr()
1368 struct smk_audit_info ad; in smack_inode_removexattr() local
1385 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_DENTRY); in smack_inode_removexattr()
1386 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_removexattr()
1388 rc = smk_curacc(smk_of_inode(d_backing_inode(dentry)), MAY_WRITE, &ad); in smack_inode_removexattr()
1559 struct smk_audit_info ad; in smack_file_ioctl() local
1565 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_ioctl()
1566 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_ioctl()
1569 rc = smk_curacc(smk_of_inode(inode), MAY_WRITE, &ad); in smack_file_ioctl()
1574 rc = smk_curacc(smk_of_inode(inode), MAY_READ, &ad); in smack_file_ioctl()
1590 struct smk_audit_info ad; in smack_file_lock() local
1597 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_lock()
1598 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_lock()
1599 rc = smk_curacc(smk_of_inode(inode), MAY_LOCK, &ad); in smack_file_lock()
1619 struct smk_audit_info ad; in smack_file_fcntl() local
1631 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_fcntl()
1632 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_fcntl()
1633 rc = smk_curacc(smk_of_inode(inode), MAY_LOCK, &ad); in smack_file_fcntl()
1638 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_fcntl()
1639 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_fcntl()
1640 rc = smk_curacc(smk_of_inode(inode), MAY_WRITE, &ad); in smack_file_fcntl()
1794 struct smk_audit_info ad; in smack_file_send_sigiotask() local
1813 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); in smack_file_send_sigiotask()
1814 smk_ad_setfield_u_tsk(&ad, tsk); in smack_file_send_sigiotask()
1815 smack_log(skp->smk_known, tkp->smk_known, MAY_DELIVER, rc, &ad); in smack_file_send_sigiotask()
1829 struct smk_audit_info ad; in smack_file_receive() local
1838 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_receive()
1839 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_receive()
1851 rc = smk_access(tsp->smk_task, ssp->smk_out, MAY_WRITE, &ad); in smack_file_receive()
1855 rc = smk_access(ssp->smk_in, tsp->smk_task, MAY_WRITE, &ad); in smack_file_receive()
1867 rc = smk_curacc(smk_of_inode(inode), may, &ad); in smack_file_receive()
1887 struct smk_audit_info ad; in smack_file_open() local
1890 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_PATH); in smack_file_open()
1891 smk_ad_setfield_u_fs_path(&ad, file->f_path); in smack_file_open()
1892 rc = smk_tskacc(tsp, smk_of_inode(inode), MAY_READ, &ad); in smack_file_open()
2047 struct smk_audit_info ad; in smk_curacc_on_task() local
2051 smk_ad_init(&ad, caller, LSM_AUDIT_DATA_TASK); in smk_curacc_on_task()
2052 smk_ad_setfield_u_tsk(&ad, p); in smk_curacc_on_task()
2053 rc = smk_curacc(skp, access, &ad); in smk_curacc_on_task()
2201 struct smk_audit_info ad; in smack_task_kill() local
2209 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_TASK); in smack_task_kill()
2210 smk_ad_setfield_u_tsk(&ad, p); in smack_task_kill()
2216 rc = smk_curacc(tkp, MAY_DELIVER, &ad); in smack_task_kill()
2226 rc = smk_access(skp, tkp, MAY_DELIVER, &ad); in smack_task_kill()
2488 struct smk_audit_info ad; in smk_ipv4_check() local
2496 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smk_ipv4_check()
2497 ad.a.u.net->family = sap->sin_family; in smk_ipv4_check()
2498 ad.a.u.net->dport = sap->sin_port; in smk_ipv4_check()
2499 ad.a.u.net->v4info.daddr = sap->sin_addr.s_addr; in smk_ipv4_check()
2502 rc = smk_access(skp, hkp, MAY_WRITE, &ad); in smk_ipv4_check()
2531 struct smk_audit_info ad; in smk_ipv6_check() local
2535 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smk_ipv6_check()
2536 ad.a.u.net->family = PF_INET6; in smk_ipv6_check()
2537 ad.a.u.net->dport = address->sin6_port; in smk_ipv6_check()
2539 ad.a.u.net->v6info.saddr = address->sin6_addr; in smk_ipv6_check()
2541 ad.a.u.net->v6info.daddr = address->sin6_addr; in smk_ipv6_check()
2543 rc = smk_access(subject, object, MAY_WRITE, &ad); in smk_ipv6_check()
2966 struct smk_audit_info ad; in smk_curacc_shm() local
2970 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC); in smk_curacc_shm()
2971 ad.a.u.ipc_id = isp->id; in smk_curacc_shm()
2973 rc = smk_curacc(ssp, access, &ad); in smk_curacc_shm()
3055 struct smk_audit_info ad; in smk_curacc_sem() local
3059 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC); in smk_curacc_sem()
3060 ad.a.u.ipc_id = isp->id; in smk_curacc_sem()
3062 rc = smk_curacc(ssp, access, &ad); in smk_curacc_sem()
3150 struct smk_audit_info ad; in smk_curacc_msq() local
3154 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC); in smk_curacc_msq()
3155 ad.a.u.ipc_id = isp->id; in smk_curacc_msq()
3157 rc = smk_curacc(msp, access, &ad); in smk_curacc_msq()
3256 struct smk_audit_info ad; in smack_ipc_permission() local
3260 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_IPC); in smack_ipc_permission()
3261 ad.a.u.ipc_id = ipp->id; in smack_ipc_permission()
3263 rc = smk_curacc(iskp, may, &ad); in smack_ipc_permission()
3610 struct smk_audit_info ad; in smack_unix_stream_connect() local
3620 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_unix_stream_connect()
3621 smk_ad_setfield_u_net_sk(&ad, other); in smack_unix_stream_connect()
3623 rc = smk_access(skp, okp, MAY_WRITE, &ad); in smack_unix_stream_connect()
3628 rc = smk_access(okp, skp, MAY_WRITE, &ad); in smack_unix_stream_connect()
3657 struct smk_audit_info ad; in smack_unix_may_send() local
3663 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_unix_may_send()
3664 smk_ad_setfield_u_net_sk(&ad, other->sk); in smack_unix_may_send()
3670 rc = smk_access(ssp->smk_out, osp->smk_in, MAY_WRITE, &ad); in smack_unix_may_send()
3930 struct smk_audit_info ad; in smack_socket_sock_rcv_skb() local
3958 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_socket_sock_rcv_skb()
3959 ad.a.u.net->family = family; in smack_socket_sock_rcv_skb()
3960 ad.a.u.net->netif = skb->skb_iif; in smack_socket_sock_rcv_skb()
3961 ipv4_skb_to_auditdata(skb, &ad.a, NULL); in smack_socket_sock_rcv_skb()
3969 rc = smk_access(skp, ssp->smk_in, MAY_WRITE, &ad); in smack_socket_sock_rcv_skb()
3991 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_socket_sock_rcv_skb()
3992 ad.a.u.net->family = family; in smack_socket_sock_rcv_skb()
3993 ad.a.u.net->netif = skb->skb_iif; in smack_socket_sock_rcv_skb()
3994 ipv6_skb_to_auditdata(skb, &ad.a, NULL); in smack_socket_sock_rcv_skb()
3996 rc = smk_access(skp, ssp->smk_in, MAY_WRITE, &ad); in smack_socket_sock_rcv_skb()
4154 struct smk_audit_info ad; in smack_inet_conn_request() local
4186 smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net); in smack_inet_conn_request()
4187 ad.a.u.net->family = family; in smack_inet_conn_request()
4188 ad.a.u.net->netif = skb->skb_iif; in smack_inet_conn_request()
4189 ipv4_skb_to_auditdata(skb, &ad.a, NULL); in smack_inet_conn_request()
4195 rc = smk_access(skp, ssp->smk_in, MAY_WRITE, &ad); in smack_inet_conn_request()
4298 struct smk_audit_info ad; in smack_key_permission() local
4346 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_KEY); in smack_key_permission()
4347 ad.a.u.key_struct.key = keyp->serial; in smack_key_permission()
4348 ad.a.u.key_struct.key_desc = keyp->description; in smack_key_permission()
4350 rc = smk_access(tkp, keyp->security, request, &ad); in smack_key_permission()
4395 struct smk_audit_info ad; in smack_watch_key() local
4417 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_KEY); in smack_watch_key()
4418 ad.a.u.key_struct.key = key->serial; in smack_watch_key()
4419 ad.a.u.key_struct.key_desc = key->description; in smack_watch_key()
4421 rc = smk_access(tkp, key->security, MAY_READ, &ad); in smack_watch_key()
4439 struct smk_audit_info ad; in smack_post_notification() local
4452 smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NOTIFICATION); in smack_post_notification()
4453 rc = smk_access(subj, obj, MAY_WRITE, &ad); in smack_post_notification()