Home
last modified time | relevance | path

Searched refs:cred (Results 1 – 25 of 27) sorted by relevance

12

/net/sunrpc/
A Dauth.c316 return cred->cr_ops->crstringify_acceptor(cred); in rpcauth_stringify_acceptor()
565 int res = cred->cr_ops->cr_init(auth, cred); in rpcauth_lookup_credcache()
582 const struct cred *cred = current_cred(); in rpcauth_lookupcred() local
585 acred.cred = cred; in rpcauth_lookupcred()
602 cred->cr_cred = get_cred(acred->cred); in rpcauth_init_cred()
628 .cred = init_task.cred, in rpcauth_bind_machine_cred()
654 .cred = cred, in rpcauth_bindcred()
662 else if (cred != NULL && cred != &machine_cred) in rpcauth_bindcred()
710 cred->cr_ops->crdestroy(cred); in put_rpccred()
822 if (!cred || !cred->cr_ops->crneed_reencode) in rpcauth_xmit_need_reencode()
[all …]
A Dauth_unix.c71 unx_destroy_cred(struct rpc_cred *cred) in unx_destroy_cred() argument
73 call_rcu(&cred->cr_rcu, unx_free_cred_callback); in unx_destroy_cred()
85 if (cred->cr_cred == acred->cred) in unx_match()
88 …if (!uid_eq(cred->cr_cred->fsuid, acred->cred->fsuid) || !gid_eq(cred->cr_cred->fsgid, acred->cred in unx_match()
91 if (acred->cred->group_info != NULL) in unx_match()
92 groups = acred->cred->group_info->ngroups; in unx_match()
95 if (cred->cr_cred->group_info == NULL) in unx_match()
97 if (groups != cred->cr_cred->group_info->ngroups) in unx_match()
101 if (!gid_eq(cred->cr_cred->group_info->gid[i], acred->cred->group_info->gid[i])) in unx_match()
114 struct rpc_cred *cred = task->tk_rqstp->rq_cred; in unx_marshal() local
[all …]
A Dsvcauth_unix.c733 cred->cr_group_info = gi; in svcauth_unix_set_client()
779 cred->cr_uid = INVALID_UID; in svcauth_null_accept()
780 cred->cr_gid = INVALID_GID; in svcauth_null_accept()
782 if (cred->cr_group_info == NULL) in svcauth_null_accept()
864 cred->cr_uid = INVALID_UID; in svcauth_tls_accept()
865 cred->cr_gid = INVALID_GID; in svcauth_tls_accept()
867 if (cred->cr_group_info == NULL) in svcauth_tls_accept()
951 cred->cr_uid = make_kuid(userns, i); in svcauth_unix_accept()
954 cred->cr_gid = make_kgid(userns, i); in svcauth_unix_accept()
964 if (cred->cr_group_info == NULL) in svcauth_unix_accept()
[all …]
A Dsvcauth.c187 const struct cred *cred, in svcauth_map_clnt_to_svc_cred_local() argument
195 svc->cr_uid = KUIDT_INIT(from_kuid_munged(userns, cred->fsuid)); in svcauth_map_clnt_to_svc_cred_local()
196 svc->cr_gid = KGIDT_INIT(from_kgid_munged(userns, cred->fsgid)); in svcauth_map_clnt_to_svc_cred_local()
198 if (cred->group_info) in svcauth_map_clnt_to_svc_cred_local()
199 svc->cr_group_info = get_group_info(cred->group_info); in svcauth_map_clnt_to_svc_cred_local()
A Dsvc_xprt.c253 size_t len, int flags, const struct cred *cred) in _svc_xprt_create() argument
277 newxprt->xpt_cred = get_cred(cred); in _svc_xprt_create()
302 int flags, const struct cred *cred) in svc_xprt_create_from_sa() argument
320 err = _svc_xprt_create(serv, xprt_name, net, sap, len, flags, cred); in svc_xprt_create_from_sa()
324 cred); in svc_xprt_create_from_sa()
346 const struct cred *cred) in svc_xprt_create() argument
375 return svc_xprt_create_from_sa(serv, xprt_name, net, sap, flags, cred); in svc_xprt_create()
A Dauth_null.c46 nul_destroy_cred(struct rpc_cred *cred) in nul_destroy_cred() argument
54 nul_match(struct auth_cred *acred, struct rpc_cred *cred, int taskflags) in nul_match() argument
A Dauth_tls.c90 static void tls_destroy_cred(struct rpc_cred *cred) in tls_destroy_cred() argument
94 static int tls_match(struct auth_cred *acred, struct rpc_cred *cred, int taskflags) in tls_match() argument
A Drpcb_clnt.c240 .cred = current_cred(), in rpcb_create_af_local()
314 .cred = current_cred(), in rpcb_create_local_net()
370 const struct cred *cred, in rpcb_create() argument
384 .cred = cred, in rpcb_create()
A Dclnt.c387 clnt->cl_cred = get_cred(args->cred); in rpc_new_client()
680 .cred = clnt->cl_cred, in rpc_clone_client()
703 .cred = clnt->cl_cred, in rpc_clone_client_set_auth()
1064 .cred = old->cl_cred, in rpc_bind_new_program()
2704 struct rpc_cred *cred = task->tk_rqstp->rq_cred; in rpc_decode_header() local
2706 if (!test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags)) { in rpc_decode_header()
2861 struct rpc_xprt *xprt, struct rpc_cred *cred, int flags, in rpc_call_null_helper() argument
2871 .rpc_op_cred = cred, in rpc_call_null_helper()
2881 struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags) in rpc_call_null() argument
2883 return rpc_call_null_helper(clnt, NULL, cred, flags, NULL, NULL); in rpc_call_null()
A Dsvcsock.c1467 char *name_return, const size_t len, const struct cred *cred) in svc_addsock() argument
1503 svsk->sk_xprt.xpt_cred = get_cred(cred); in svc_addsock()
/net/sunrpc/auth_gss/
A Dauth_gss.c406 const struct cred *cred) in gss_encode_v0_msg() argument
433 const struct cred *cred) in gss_encode_v1_msg() argument
567 kuid_t uid = cred->cr_cred->fsuid; in gss_setup_upcall()
1342 put_cred(cred->cr_cred); in gss_destroy_nullcred()
1353 gss_send_destroy_context(cred); in gss_destroy_cred()
1354 gss_destroy_nullcred(cred); in gss_destroy_cred()
1377 struct gss_cred *cred = NULL; in gss_create_cred() local
1380 if (!(cred = kzalloc(sizeof(*cred), gfp))) in gss_create_cred()
1392 return &cred->gc_base; in gss_create_cred()
1610 .cred = oldcred->cr_cred, in gss_renew_cred()
[all …]
A Dsvcauth_gss.c371 struct svc_cred cred; member
385 free_svc_cred(&rsci->cred); in rsc_free()
402 free_svc_cred(&rsci->cred); in rsc_put()
432 init_svc_cred(&new->cred); in rsc_init()
445 new->cred = tmp->cred; in update_rsc()
446 init_svc_cred(&tmp->cred); in update_rsc()
527 if (rsci.cred.cr_group_info == NULL) in rsc_parse()
566 if (!rsci.cred.cr_principal) { in rsc_parse()
1255 rsci.cred = ud->creds; in gss_proxy_save_rsc()
1263 rsci.cred.cr_gss_mech = gm; in gss_proxy_save_rsc()
[all …]
A Dgss_rpc_xdr.c550 struct gssx_cred *cred) in gssx_enc_cred() argument
555 err = gssx_enc_name(xdr, &cred->desired_name); in gssx_enc_cred()
560 err = dummy_enc_credel_array(xdr, &cred->elements); in gssx_enc_cred()
565 err = gssx_enc_buffer(xdr, &cred->cred_handle_reference); in gssx_enc_cred()
570 err = gssx_enc_bool(xdr, cred->needs_release); in gssx_enc_cred()
/net/dns_resolver/
A Ddns_key.c45 const struct cred *dns_resolver_cache;
337 struct cred *cred; in init_dns_resolver() local
347 cred = prepare_kernel_cred(&init_task); in init_dns_resolver()
348 if (!cred) in init_dns_resolver()
352 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in init_dns_resolver()
368 cred->thread_keyring = keyring; in init_dns_resolver()
369 cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING; in init_dns_resolver()
370 dns_resolver_cache = cred; in init_dns_resolver()
378 put_cred(cred); in init_dns_resolver()
A Dinternal.h36 extern const struct cred *dns_resolver_cache;
A Ddns_query.c81 const struct cred *saved_cred; in dns_query()
/net/core/
A Dscm.c51 const struct cred *cred = current_cred(); in scm_check_creds() local
52 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds()
53 kgid_t gid = make_kgid(cred->user_ns, creds->gid); in scm_check_creds()
60 ((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) || in scm_check_creds()
61 uid_eq(uid, cred->suid)) || ns_capable(cred->user_ns, CAP_SETUID)) && in scm_check_creds()
62 ((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) || in scm_check_creds()
63 gid_eq(gid, cred->sgid)) || ns_capable(cred->user_ns, CAP_SETGID))) { in scm_check_creds()
A Dsock.c1682 const struct cred *cred; in sk_get_peer_cred() local
1685 cred = get_cred(sk->sk_peer_cred); in sk_get_peer_cred()
1688 return cred; in sk_get_peer_cred()
1691 static void cred_to_ucred(struct pid *pid, const struct cred *cred, in cred_to_ucred() argument
1696 if (cred) { in cred_to_ucred()
1948 const struct cred *cred; in sk_getsockopt() local
1951 cred = sk_get_peer_cred(sk); in sk_getsockopt()
1952 if (!cred) in sk_getsockopt()
1955 n = cred->group_info->ngroups; in sk_getsockopt()
1958 put_cred(cred); in sk_getsockopt()
[all …]
/net/rxrpc/
A Drxgk_app.c47 const struct cred *cred = current_cred(); // TODO - use socket creds in rxgk_yfs_decode_ticket() local
139 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, // TODO: Use socket owner in rxgk_yfs_decode_ticket()
A Dkey.c647 const struct cred *cred = current_cred(); in rxrpc_get_server_data_key() local
659 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, 0, in rxrpc_get_server_data_key()
703 const struct cred *cred = current_cred(); in rxrpc_get_null_key() local
708 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in rxrpc_get_null_key()
/net/netfilter/
A Dnf_log_syslog.c173 const struct cred *cred = sk->sk_socket->file->f_cred; in nf_log_dump_sk_uid_gid() local
176 from_kuid_munged(&init_user_ns, cred->fsuid), in nf_log_dump_sk_uid_gid()
177 from_kgid_munged(&init_user_ns, cred->fsgid)); in nf_log_dump_sk_uid_gid()
A Dnfnetlink_log.c617 const struct cred *cred = file->f_cred; in __build_packet_message() local
619 __be32 uid = htonl(from_kuid_munged(user_ns, cred->fsuid)); in __build_packet_message()
620 __be32 gid = htonl(from_kgid_munged(user_ns, cred->fsgid)); in __build_packet_message()
A Dnfnetlink_queue.c437 const struct cred *cred; in nfqnl_put_sk_uidgid() local
444 cred = sk->sk_socket->file->f_cred; in nfqnl_put_sk_uidgid()
446 htonl(from_kuid_munged(&init_user_ns, cred->fsuid)))) in nfqnl_put_sk_uidgid()
449 htonl(from_kgid_munged(&init_user_ns, cred->fsgid)))) in nfqnl_put_sk_uidgid()
/net/unix/
A Daf_unix.c753 const struct cred *peer_cred;
772 const struct cred *cred = NULL; in drop_peercred() local
778 swap(peercred->peer_cred, cred); in drop_peercred()
781 put_cred(cred); in drop_peercred()
793 const struct cred *old_cred; in update_peercred()
1213 const struct cred *cred; in unix_find_bsd() local
1214 struct cred *kcred; in unix_find_bsd()
1227 cred = override_creds(kcred); in unix_find_bsd()
1231 put_cred(revert_creds(cred)); in unix_find_bsd()
/net/bluetooth/
A Daf_bluetooth.c215 const struct cred *old_cred; in bt_accept_enqueue()

Completed in 79 milliseconds

12