Lines Matching refs:isec
245 struct inode_security_struct *isec = selinux_inode(inode); in inode_alloc_security() local
248 spin_lock_init(&isec->lock); in inode_alloc_security()
249 INIT_LIST_HEAD(&isec->list); in inode_alloc_security()
250 isec->inode = inode; in inode_alloc_security()
251 isec->sid = SECINITSID_UNLABELED; in inode_alloc_security()
252 isec->sclass = SECCLASS_FILE; in inode_alloc_security()
253 isec->task_sid = sid; in inode_alloc_security()
254 isec->initialized = LABEL_INVALID; in inode_alloc_security()
271 struct inode_security_struct *isec = selinux_inode(inode); in __inode_security_revalidate() local
276 isec->initialized != LABEL_INITIALIZED) { in __inode_security_revalidate()
334 struct inode_security_struct *isec = selinux_inode(inode); in inode_free_security() local
337 if (!isec) in inode_free_security()
350 if (!list_empty_careful(&isec->list)) { in inode_free_security()
352 list_del_init(&isec->list); in inode_free_security()
592 struct inode_security_struct *isec = in sb_finish_set_opts() local
595 struct inode *inode = isec->inode; in sb_finish_set_opts()
596 list_del_init(&isec->list); in sb_finish_set_opts()
1132 struct inode_security_struct *isec = backing_inode_security(root); in selinux_sb_show_options() local
1135 rc = show_sid(m, isec->sid); in selinux_sb_show_options()
1434 struct inode_security_struct *isec = selinux_inode(inode); in inode_doinit_with_dentry() local
1440 if (isec->initialized == LABEL_INITIALIZED) in inode_doinit_with_dentry()
1443 spin_lock(&isec->lock); in inode_doinit_with_dentry()
1444 if (isec->initialized == LABEL_INITIALIZED) in inode_doinit_with_dentry()
1447 if (isec->sclass == SECCLASS_FILE) in inode_doinit_with_dentry()
1448 isec->sclass = inode_mode_to_security_class(inode->i_mode); in inode_doinit_with_dentry()
1456 if (list_empty(&isec->list)) in inode_doinit_with_dentry()
1457 list_add(&isec->list, &sbsec->isec_head); in inode_doinit_with_dentry()
1462 sclass = isec->sclass; in inode_doinit_with_dentry()
1463 task_sid = isec->task_sid; in inode_doinit_with_dentry()
1464 sid = isec->sid; in inode_doinit_with_dentry()
1465 isec->initialized = LABEL_PENDING; in inode_doinit_with_dentry()
1466 spin_unlock(&isec->lock); in inode_doinit_with_dentry()
1580 spin_lock(&isec->lock); in inode_doinit_with_dentry()
1581 if (isec->initialized == LABEL_PENDING) { in inode_doinit_with_dentry()
1583 isec->initialized = LABEL_INVALID; in inode_doinit_with_dentry()
1587 isec->initialized = LABEL_INITIALIZED; in inode_doinit_with_dentry()
1588 isec->sid = sid; in inode_doinit_with_dentry()
1592 spin_unlock(&isec->lock); in inode_doinit_with_dentry()
1673 struct inode_security_struct *isec; in inode_has_perm() local
1682 isec = selinux_inode(inode); in inode_has_perm()
1685 sid, isec->sid, isec->sclass, perms, adp); in inode_has_perm()
1862 struct inode_security_struct *dsec, *isec; in may_link() local
1869 isec = backing_inode_security(dentry); in may_link()
1898 sid, isec->sid, isec->sclass, av, &ad); in may_link()
2094 struct inode_security_struct *isec; in selinux_binder_transfer_file() local
2120 isec = backing_inode_security(dentry); in selinux_binder_transfer_file()
2122 sid, isec->sid, isec->sclass, file_to_av(file), in selinux_binder_transfer_file()
2333 struct inode_security_struct *isec; in selinux_bprm_set_creds() local
2345 isec = inode_security(inode); in selinux_bprm_set_creds()
2368 isec->sid, SECCLASS_PROCESS, NULL, in selinux_bprm_set_creds()
2387 old_tsec->sid, isec->sid, in selinux_bprm_set_creds()
2400 new_tsec->sid, isec->sid, in selinux_bprm_set_creds()
2922 struct inode_security_struct *isec = selinux_inode(inode); in selinux_inode_init_security() local
2923 isec->sclass = inode_mode_to_security_class(inode->i_mode); in selinux_inode_init_security()
2924 isec->sid = newsid; in selinux_inode_init_security()
2925 isec->initialized = LABEL_INITIALIZED; in selinux_inode_init_security()
2999 struct inode_security_struct *isec; in selinux_inode_follow_link() local
3007 isec = inode_security_rcu(inode, rcu); in selinux_inode_follow_link()
3008 if (IS_ERR(isec)) in selinux_inode_follow_link()
3009 return PTR_ERR(isec); in selinux_inode_follow_link()
3012 sid, isec->sid, isec->sclass, FILE__READ, &ad); in selinux_inode_follow_link()
3021 struct inode_security_struct *isec = selinux_inode(inode); in audit_inode_permission() local
3028 current_sid(), isec->sid, isec->sclass, perms, in audit_inode_permission()
3041 struct inode_security_struct *isec; in selinux_inode_permission() local
3062 isec = inode_security_rcu(inode, flags & MAY_NOT_BLOCK); in selinux_inode_permission()
3063 if (IS_ERR(isec)) in selinux_inode_permission()
3064 return PTR_ERR(isec); in selinux_inode_permission()
3067 sid, isec->sid, isec->sclass, perms, in selinux_inode_permission()
3131 struct inode_security_struct *isec; in selinux_inode_setxattr() local
3157 isec = backing_inode_security(dentry); in selinux_inode_setxattr()
3159 sid, isec->sid, isec->sclass, in selinux_inode_setxattr()
3198 sid, newsid, isec->sclass, in selinux_inode_setxattr()
3203 rc = security_validate_transition(&selinux_state, isec->sid, newsid, in selinux_inode_setxattr()
3204 sid, isec->sclass); in selinux_inode_setxattr()
3221 struct inode_security_struct *isec; in selinux_inode_post_setxattr() local
3239 isec = backing_inode_security(dentry); in selinux_inode_post_setxattr()
3240 spin_lock(&isec->lock); in selinux_inode_post_setxattr()
3241 isec->sclass = inode_mode_to_security_class(inode->i_mode); in selinux_inode_post_setxattr()
3242 isec->sid = newsid; in selinux_inode_post_setxattr()
3243 isec->initialized = LABEL_INITIALIZED; in selinux_inode_post_setxattr()
3244 spin_unlock(&isec->lock); in selinux_inode_post_setxattr()
3334 struct inode_security_struct *isec; in selinux_inode_getsecurity() local
3348 isec = inode_security(inode); in selinux_inode_getsecurity()
3351 isec->sid, &context, in selinux_inode_getsecurity()
3354 error = security_sid_to_context(&selinux_state, isec->sid, in selinux_inode_getsecurity()
3371 struct inode_security_struct *isec = inode_security_novalidate(inode); in selinux_inode_setsecurity() local
3390 spin_lock(&isec->lock); in selinux_inode_setsecurity()
3391 isec->sclass = inode_mode_to_security_class(inode->i_mode); in selinux_inode_setsecurity()
3392 isec->sid = newsid; in selinux_inode_setsecurity()
3393 isec->initialized = LABEL_INITIALIZED; in selinux_inode_setsecurity()
3394 spin_unlock(&isec->lock); in selinux_inode_setsecurity()
3408 struct inode_security_struct *isec = inode_security_novalidate(inode); in selinux_inode_getsecid() local
3409 *secid = isec->sid; in selinux_inode_getsecid()
3527 struct inode_security_struct *isec; in selinux_file_permission() local
3534 isec = inode_security(inode); in selinux_file_permission()
3535 if (sid == fsec->sid && fsec->isid == isec->sid && in selinux_file_permission()
3558 struct inode_security_struct *isec; in ioctl_has_perm() local
3583 isec = inode_security(inode); in ioctl_has_perm()
3585 ssid, isec->sid, isec->sclass, in ioctl_has_perm()
3845 struct inode_security_struct *isec; in selinux_file_open() local
3848 isec = inode_security(file_inode(file)); in selinux_file_open()
3856 fsec->isid = isec->sid; in selinux_file_open()
3939 struct inode_security_struct *isec = inode_security(inode); in selinux_kernel_create_files_as() local
3945 sid, isec->sid, in selinux_kernel_create_files_as()
3951 tsec->create_sid = isec->sid; in selinux_kernel_create_files_as()
3970 struct inode_security_struct *isec; in selinux_kernel_module_from_file() local
3994 isec = inode_security(file_inode(file)); in selinux_kernel_module_from_file()
3996 sid, isec->sid, SECCLASS_SYSTEM, in selinux_kernel_module_from_file()
4152 struct inode_security_struct *isec = selinux_inode(inode); in selinux_task_to_inode() local
4155 spin_lock(&isec->lock); in selinux_task_to_inode()
4156 isec->sclass = inode_mode_to_security_class(inode->i_mode); in selinux_task_to_inode()
4157 isec->sid = sid; in selinux_task_to_inode()
4158 isec->initialized = LABEL_INITIALIZED; in selinux_task_to_inode()
4159 spin_unlock(&isec->lock); in selinux_task_to_inode()
4510 struct inode_security_struct *isec = inode_security_novalidate(SOCK_INODE(sock)); in selinux_socket_post_create() local
4522 isec->sclass = sclass; in selinux_socket_post_create()
4523 isec->sid = sid; in selinux_socket_post_create()
4524 isec->initialized = LABEL_INITIALIZED; in selinux_socket_post_create()
4802 struct inode_security_struct *isec; in selinux_socket_accept() local
4811 isec = inode_security_novalidate(SOCK_INODE(sock)); in selinux_socket_accept()
4812 spin_lock(&isec->lock); in selinux_socket_accept()
4813 sclass = isec->sclass; in selinux_socket_accept()
4814 sid = isec->sid; in selinux_socket_accept()
4815 spin_unlock(&isec->lock); in selinux_socket_accept()
5091 struct inode_security_struct *isec; in selinux_socket_getpeersec_dgram() local
5103 isec = inode_security_novalidate(SOCK_INODE(sock)); in selinux_socket_getpeersec_dgram()
5104 peer_secid = isec->sid; in selinux_socket_getpeersec_dgram()
5166 struct inode_security_struct *isec = in selinux_sock_graft() local
5172 isec->sid = sksec->sid; in selinux_sock_graft()
5173 sksec->sclass = isec->sclass; in selinux_sock_graft()
5879 static void ipc_init_security(struct ipc_security_struct *isec, u16 sclass) in ipc_init_security() argument
5881 isec->sclass = sclass; in ipc_init_security()
5882 isec->sid = current_sid(); in ipc_init_security()
5898 struct ipc_security_struct *isec; in ipc_has_perm() local
5902 isec = selinux_ipc(ipc_perms); in ipc_has_perm()
5908 sid, isec->sid, isec->sclass, perms, &ad); in ipc_has_perm()
5919 struct ipc_security_struct *isec; in selinux_msg_queue_alloc_security() local
5924 isec = selinux_ipc(msq); in selinux_msg_queue_alloc_security()
5925 ipc_init_security(isec, SECCLASS_MSGQ); in selinux_msg_queue_alloc_security()
5931 sid, isec->sid, SECCLASS_MSGQ, in selinux_msg_queue_alloc_security()
5938 struct ipc_security_struct *isec; in selinux_msg_queue_associate() local
5942 isec = selinux_ipc(msq); in selinux_msg_queue_associate()
5948 sid, isec->sid, SECCLASS_MSGQ, in selinux_msg_queue_associate()
5985 struct ipc_security_struct *isec; in selinux_msg_queue_msgsnd() local
5991 isec = selinux_ipc(msq); in selinux_msg_queue_msgsnd()
6002 rc = security_transition_sid(&selinux_state, sid, isec->sid, in selinux_msg_queue_msgsnd()
6013 sid, isec->sid, SECCLASS_MSGQ, in selinux_msg_queue_msgsnd()
6023 msec->sid, isec->sid, SECCLASS_MSGQ, in selinux_msg_queue_msgsnd()
6033 struct ipc_security_struct *isec; in selinux_msg_queue_msgrcv() local
6039 isec = selinux_ipc(msq); in selinux_msg_queue_msgrcv()
6046 sid, isec->sid, in selinux_msg_queue_msgrcv()
6058 struct ipc_security_struct *isec; in selinux_shm_alloc_security() local
6063 isec = selinux_ipc(shp); in selinux_shm_alloc_security()
6064 ipc_init_security(isec, SECCLASS_SHM); in selinux_shm_alloc_security()
6070 sid, isec->sid, SECCLASS_SHM, in selinux_shm_alloc_security()
6077 struct ipc_security_struct *isec; in selinux_shm_associate() local
6081 isec = selinux_ipc(shp); in selinux_shm_associate()
6087 sid, isec->sid, SECCLASS_SHM, in selinux_shm_associate()
6143 struct ipc_security_struct *isec; in selinux_sem_alloc_security() local
6148 isec = selinux_ipc(sma); in selinux_sem_alloc_security()
6149 ipc_init_security(isec, SECCLASS_SEM); in selinux_sem_alloc_security()
6155 sid, isec->sid, SECCLASS_SEM, in selinux_sem_alloc_security()
6162 struct ipc_security_struct *isec; in selinux_sem_associate() local
6166 isec = selinux_ipc(sma); in selinux_sem_associate()
6172 sid, isec->sid, SECCLASS_SEM, in selinux_sem_associate()
6252 struct ipc_security_struct *isec = selinux_ipc(ipcp); in selinux_ipc_getsecid() local
6253 *secid = isec->sid; in selinux_ipc_getsecid()
6479 struct inode_security_struct *isec = selinux_inode(inode); in selinux_inode_invalidate_secctx() local
6481 spin_lock(&isec->lock); in selinux_inode_invalidate_secctx()
6482 isec->initialized = LABEL_INVALID; in selinux_inode_invalidate_secctx()
6483 spin_unlock(&isec->lock); in selinux_inode_invalidate_secctx()