Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 34) sorted by relevance

12

/security/keys/
Dtrusted.c63 int ret; in TSS_sha1() local
71 ret = crypto_shash_digest(&sdesc->shash, data, datalen, digest); in TSS_sha1()
73 return ret; in TSS_sha1()
83 int ret; in TSS_rawhmac() local
91 ret = crypto_shash_setkey(hmacalg, key, keylen); in TSS_rawhmac()
92 if (ret < 0) in TSS_rawhmac()
94 ret = crypto_shash_init(&sdesc->shash); in TSS_rawhmac()
95 if (ret < 0) in TSS_rawhmac()
105 ret = -EINVAL; in TSS_rawhmac()
108 ret = crypto_shash_update(&sdesc->shash, data, dlen); in TSS_rawhmac()
[all …]
Dkeyctl.c35 int ret; in key_get_type_from_user() local
37 ret = strncpy_from_user(type, _type, len); in key_get_type_from_user()
38 if (ret < 0) in key_get_type_from_user()
39 return ret; in key_get_type_from_user()
40 if (ret == 0 || ret >= len) in key_get_type_from_user()
69 long ret; in SYSCALL_DEFINE5() local
72 ret = -EINVAL; in SYSCALL_DEFINE5()
77 ret = key_get_type_from_user(type, _type, sizeof(type)); in SYSCALL_DEFINE5()
78 if (ret < 0) in SYSCALL_DEFINE5()
85 ret = PTR_ERR(description); in SYSCALL_DEFINE5()
[all …]
Dprocess_keys.c50 int ret; in install_user_keyrings() local
66 ret = 0; in install_user_keyrings()
83 ret = PTR_ERR(uid_keyring); in install_user_keyrings()
101 ret = PTR_ERR(session_keyring); in install_user_keyrings()
107 ret = key_link(session_keyring, uid_keyring); in install_user_keyrings()
108 if (ret < 0) in install_user_keyrings()
127 kleave(" = %d", ret); in install_user_keyrings()
128 return ret; in install_user_keyrings()
162 int ret; in install_thread_keyring() local
168 ret = install_thread_keyring_to_cred(new); in install_thread_keyring()
[all …]
Drequest_key.c105 int ret, i; in call_sbin_request_key() local
109 ret = install_user_keyrings(); in call_sbin_request_key()
110 if (ret < 0) in call_sbin_request_key()
122 ret = PTR_ERR(keyring); in call_sbin_request_key()
127 ret = key_link(keyring, authkey); in call_sbin_request_key()
128 if (ret < 0) in call_sbin_request_key()
175 ret = call_usermodehelper_keys(argv[0], argv, envp, keyring, in call_sbin_request_key()
177 kdebug("usermode -> 0x%x", ret); in call_sbin_request_key()
178 if (ret >= 0) { in call_sbin_request_key()
182 ret = -ENOKEY; in call_sbin_request_key()
[all …]
Dkey.c231 int ret; in key_alloc() local
238 ret = type->vet_description(desc); in key_alloc()
239 if (ret < 0) { in key_alloc()
240 key = ERR_PTR(ret); in key_alloc()
309 ret = security_key_alloc(key, cred, flags); in key_alloc()
310 if (ret < 0) in key_alloc()
330 key = ERR_PTR(ret); in key_alloc()
369 int ret = 0; in key_payload_reserve() local
383 ret = -EDQUOT; in key_payload_reserve()
393 if (ret == 0) in key_payload_reserve()
[all …]
Dbig_key.c54 int ret; in big_key_preparse() local
56 ret = -EINVAL; in big_key_preparse()
73 ret = PTR_ERR(file); in big_key_preparse()
79 ret = written; in big_key_preparse()
81 ret = -ENOMEM; in big_key_preparse()
104 return ret; in big_key_preparse()
172 long ret; in big_key_read() local
187 ret = vfs_read(file, buffer, datalen, &pos); in big_key_read()
189 if (ret >= 0 && ret != datalen) in big_key_read()
190 ret = -EIO; in big_key_read()
[all …]
Dpersistent.c82 long ret; in key_get_persistent() local
111 ret = key_task_permission(persistent_ref, current_cred(), KEY_NEED_LINK); in key_get_persistent()
112 if (ret == 0) { in key_get_persistent()
114 ret = key_link(key_ref_to_ptr(dest_ref), persistent); in key_get_persistent()
115 if (ret == 0) { in key_get_persistent()
117 ret = persistent->serial; in key_get_persistent()
122 return ret; in key_get_persistent()
134 long ret; in keyctl_get_persistent() local
158 ret = -ENOTDIR; in keyctl_get_persistent()
162 ret = key_get_persistent(ns, uid, dest_ref); in keyctl_get_persistent()
[all …]
Dkeyring.c428 int ret; in keyring_read_iterator() local
436 ret = put_user(key->serial, ctx->buffer); in keyring_read_iterator()
437 if (ret < 0) in keyring_read_iterator()
438 return ret; in keyring_read_iterator()
455 long ret; in keyring_read() local
467 ret = assoc_array_iterate(&keyring->keys, in keyring_read()
469 if (ret < 0) { in keyring_read()
470 kleave(" = %ld [iterate]", ret); in keyring_read()
471 return ret; in keyring_read()
476 ret = keyring->keys.nr_leaves_on_tree * sizeof(key_serial_t); in keyring_read()
[all …]
Duser_defined.c101 int ret; in user_update() local
103 ret = -EINVAL; in user_update()
108 ret = -ENOMEM; in user_update()
119 ret = key_payload_reserve(key, datalen); in user_update()
121 if (ret == 0) { in user_update()
135 return ret; in user_update()
190 long ret; in user_read() local
193 ret = upayload->datalen; in user_read()
201 ret = -EFAULT; in user_read()
204 return ret; in user_read()
Dcompat.c34 long ret; in compat_keyctl_instantiate_key_iov() local
39 ret = compat_rw_copy_check_uvector(WRITE, _payload_iov, ioc, in compat_keyctl_instantiate_key_iov()
42 if (ret < 0) in compat_keyctl_instantiate_key_iov()
44 if (ret == 0) in compat_keyctl_instantiate_key_iov()
47 ret = keyctl_instantiate_key_common(id, iov, ioc, ret, ringid); in compat_keyctl_instantiate_key_iov()
51 return ret; in compat_keyctl_instantiate_key_iov()
Drequest_key_auth.c89 long ret; in request_key_auth_read() local
92 ret = datalen; in request_key_auth_read()
100 ret = -EFAULT; in request_key_auth_read()
103 return ret; in request_key_auth_read()
154 int ret; in request_key_auth_new() local
207 ret = PTR_ERR(authkey); in request_key_auth_new()
212 ret = key_instantiate_and_link(authkey, rka, 0, NULL, NULL); in request_key_auth_new()
213 if (ret < 0) in request_key_auth_new()
234 kleave("= %d", ret); in request_key_auth_new()
235 return ERR_PTR(ret); in request_key_auth_new()
Dpermission.c35 int ret; in key_task_permission() local
53 ret = groups_search(cred->group_info, key->gid); in key_task_permission()
54 if (ret) { in key_task_permission()
/security/keys/encrypted-keys/
Dencrypted.c182 int ret = -EINVAL; in datablob_parse() local
190 return ret; in datablob_parse()
198 return ret; in datablob_parse()
239 ret = 0; in datablob_parse()
252 ret = 0; in datablob_parse()
261 ret = 0; in datablob_parse()
269 return ret; in datablob_parse()
349 int ret; in calc_hmac() local
357 ret = crypto_shash_setkey(hmacalg, key, keylen); in calc_hmac()
358 if (!ret) in calc_hmac()
[all …]
/security/
Dsecurity.c241 int ret; in security_bprm_check() local
243 ret = security_ops->bprm_check_security(bprm); in security_bprm_check()
244 if (ret) in security_bprm_check()
245 return ret; in security_bprm_check()
366 int ret; in security_inode_init_security() local
376 ret = security_ops->inode_init_security(inode, dir, qstr, in security_inode_init_security()
380 if (ret) in security_inode_init_security()
384 ret = evm_inode_init_security(inode, lsm_xattr, evm_xattr); in security_inode_init_security()
385 if (ret) in security_inode_init_security()
387 ret = initxattrs(inode, new_xattrs, fs_data); in security_inode_init_security()
[all …]
Dcommoncap.c154 int ret = 0; in cap_ptrace_access_check() local
170 ret = -EPERM; in cap_ptrace_access_check()
173 return ret; in cap_ptrace_access_check()
191 int ret = 0; in cap_ptrace_traceme() local
202 ret = -EPERM; in cap_ptrace_traceme()
205 return ret; in cap_ptrace_traceme()
367 int ret = 0; in bprm_caps_from_vfs_caps() local
389 ret = -EPERM; in bprm_caps_from_vfs_caps()
397 return *effective ? ret : 0; in bprm_caps_from_vfs_caps()
514 int ret; in cap_bprm_set_creds() local
[all …]
Dmin_addr.c34 int ret; in mmap_min_addr_handler() local
39 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); in mmap_min_addr_handler()
43 return ret; in mmap_min_addr_handler()
/security/selinux/
Dnetif.c138 int ret; in sel_netif_sid_slow() local
158 ret = 0; in sel_netif_sid_slow()
163 ret = -ENOMEM; in sel_netif_sid_slow()
166 ret = security_netif_sid(dev->name, &new->nsec.sid); in sel_netif_sid_slow()
167 if (ret != 0) in sel_netif_sid_slow()
171 ret = sel_netif_insert(new); in sel_netif_sid_slow()
172 if (ret != 0) in sel_netif_sid_slow()
179 if (unlikely(ret)) { in sel_netif_sid_slow()
186 return ret; in sel_netif_sid_slow()
Dselinuxfs.c439 int ret; in sel_read_policy() local
443 ret = task_has_security(current, SECURITY__READ_POLICY); in sel_read_policy()
444 if (ret) in sel_read_policy()
447 ret = simple_read_from_buffer(buf, count, ppos, plm->data, plm->len); in sel_read_policy()
450 return ret; in sel_read_policy()
1039 struct inode *ret = new_inode(sb); in sel_make_inode() local
1041 if (ret) { in sel_make_inode()
1042 ret->i_mode = mode; in sel_make_inode()
1043 ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; in sel_make_inode()
1045 return ret; in sel_make_inode()
[all …]
Dnetnode.c202 int ret = -ENOMEM; in sel_netnode_sid_slow() local
218 ret = security_node_sid(PF_INET, in sel_netnode_sid_slow()
223 ret = security_node_sid(PF_INET6, in sel_netnode_sid_slow()
229 ret = -EINVAL; in sel_netnode_sid_slow()
231 if (ret != 0) in sel_netnode_sid_slow()
240 if (unlikely(ret)) { in sel_netnode_sid_slow()
246 return ret; in sel_netnode_sid_slow()
Dnetlink.c29 int ret = 0; in selnl_msglen() local
33 ret = sizeof(struct selnl_msg_setenforce); in selnl_msglen()
37 ret = sizeof(struct selnl_msg_policyload); in selnl_msglen()
43 return ret; in selnl_msglen()
Dnetport.c150 int ret = -ENOMEM; in sel_netport_sid_slow() local
164 ret = security_port_sid(protocol, pnum, sid); in sel_netport_sid_slow()
165 if (ret != 0) in sel_netport_sid_slow()
175 if (unlikely(ret)) { in sel_netport_sid_slow()
181 return ret; in sel_netport_sid_slow()
/security/integrity/
Ddigsig_asymmetric.c73 int ret = -ENOMEM; in asymmetric_verify() local
99 ret = verify_signature(key, &pks); in asymmetric_verify()
103 pr_debug("%s() = %d\n", __func__, ret); in asymmetric_verify()
104 return ret; in asymmetric_verify()
/security/integrity/ima/
Dima_queue.c49 struct ima_queue_entry *qe, *ret = NULL; in ima_lookup_digest_entry() local
58 ret = qe; in ima_lookup_digest_entry()
63 return ret; in ima_lookup_digest_entry()
/security/selinux/ss/
Dsidtab.c202 int ret = 0; in sidtab_context_to_sid() local
218 ret = -ENOMEM; in sidtab_context_to_sid()
226 ret = sidtab_insert(s, sid, context); in sidtab_context_to_sid()
227 if (ret) in sidtab_context_to_sid()
233 if (ret) in sidtab_context_to_sid()
234 return ret; in sidtab_context_to_sid()
Dhashtab.c125 int ret; in hashtab_map() local
134 ret = apply(cur->key, cur->datum, args); in hashtab_map()
135 if (ret) in hashtab_map()
136 return ret; in hashtab_map()

12