/net/sunrpc/ |
D | auth.c | 41 static struct cred machine_cred = { 49 const struct cred *rpc_machine_cred(void) in rpc_machine_cred() 261 rpcauth_unhash_cred_locked(struct rpc_cred *cred) in rpcauth_unhash_cred_locked() argument 263 if (!test_and_clear_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags)) in rpcauth_unhash_cred_locked() 265 hlist_del_rcu(&cred->cr_hash); in rpcauth_unhash_cred_locked() 270 rpcauth_unhash_cred(struct rpc_cred *cred) in rpcauth_unhash_cred() argument 275 if (!test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags)) in rpcauth_unhash_cred() 277 cache_lock = &cred->cr_auth->au_credcache->lock; in rpcauth_unhash_cred() 279 ret = rpcauth_unhash_cred_locked(cred); in rpcauth_unhash_cred() 312 rpcauth_stringify_acceptor(struct rpc_cred *cred) in rpcauth_stringify_acceptor() argument [all …]
|
D | auth_unix.c | 71 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() 80 unx_match(struct auth_cred *acred, struct rpc_cred *cred, int flags) in unx_match() argument 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() [all …]
|
D | svcauth_unix.c | 675 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_set_client() local 722 gi = unix_gid_find(cred->cr_uid, rqstp); in svcauth_unix_set_client() 731 put_group_info(cred->cr_group_info); in svcauth_unix_set_client() 732 cred->cr_group_info = gi; in svcauth_unix_set_client() 757 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_null_accept() local 778 cred->cr_uid = INVALID_UID; in svcauth_null_accept() 779 cred->cr_gid = INVALID_GID; in svcauth_null_accept() 780 cred->cr_group_info = groups_alloc(0); in svcauth_null_accept() 781 if (cred->cr_group_info == NULL) in svcauth_null_accept() 834 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_tls_accept() local [all …]
|
D | auth_null.c | 46 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
|
D | auth_tls.c | 90 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
|
D | rpcb_clnt.c | 240 .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()
|
D | svc_xprt.c | 300 const struct cred *cred) in _svc_xprt_create() argument 321 newxprt->xpt_cred = get_cred(cred); in _svc_xprt_create() 350 const struct cred *cred) in svc_xprt_create() argument 354 err = _svc_xprt_create(serv, xprt_name, net, family, port, flags, cred); in svc_xprt_create() 357 err = _svc_xprt_create(serv, xprt_name, net, family, port, flags, cred); in svc_xprt_create()
|
D | clnt.c | 397 clnt->cl_cred = get_cred(args->cred); in rpc_new_client() 687 .cred = clnt->cl_cred, in rpc_clone_client() 710 .cred = clnt->cl_cred, in rpc_clone_client_set_auth() 1057 .cred = old->cl_cred, in rpc_bind_new_program() 2829 struct rpc_xprt *xprt, struct rpc_cred *cred, int flags, in rpc_call_null_helper() argument 2839 .rpc_op_cred = cred, in rpc_call_null_helper() 2849 struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags) in rpc_call_null() argument 2851 return rpc_call_null_helper(clnt, NULL, cred, flags, NULL, NULL); in rpc_call_null()
|
D | svcsock.c | 1459 char *name_return, const size_t len, const struct cred *cred) in svc_addsock() argument 1495 svsk->sk_xprt.xpt_cred = get_cred(cred); in svc_addsock()
|
D | xprtsock.c | 2650 .cred = upper_clnt->cl_cred, in xs_tcp_tls_setup_socket()
|
/net/sunrpc/auth_gss/ |
D | auth_gss.c | 133 gss_cred_set_ctx(struct rpc_cred *cred, struct gss_cl_ctx *ctx) in gss_cred_set_ctx() argument 135 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_set_ctx() 137 if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) in gss_cred_set_ctx() 141 set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_cred_set_ctx() 143 clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags); in gss_cred_set_ctx() 147 gss_cred_get_ctx(struct rpc_cred *cred) in gss_cred_get_ctx() argument 149 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_get_ctx() 406 const struct cred *cred) in gss_encode_v0_msg() argument 408 struct user_namespace *userns = cred->user_ns; in gss_encode_v0_msg() 433 const struct cred *cred) in gss_encode_v1_msg() argument [all …]
|
D | svcauth_gss.c | 371 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() 513 rsci.cred.cr_uid = make_kuid(current_user_ns(), id); in rsc_parse() 518 rsci.cred.cr_gid = make_kgid(current_user_ns(), id); in rsc_parse() 526 rsci.cred.cr_group_info = groups_alloc(N); in rsc_parse() 527 if (rsci.cred.cr_group_info == NULL) in rsc_parse() [all …]
|
D | gss_rpc_xdr.c | 550 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/ |
D | dns_key.c | 45 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()
|
D | internal.h | 36 extern const struct cred *dns_resolver_cache;
|
D | dns_query.c | 81 const struct cred *saved_cred; in dns_query()
|
/net/core/ |
D | scm.c | 48 const struct cred *cred = current_cred(); in scm_check_creds() local 49 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds() 50 kgid_t gid = make_kgid(cred->user_ns, creds->gid); in scm_check_creds() 57 ((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) || in scm_check_creds() 58 uid_eq(uid, cred->suid)) || ns_capable(cred->user_ns, CAP_SETUID)) && in scm_check_creds() 59 ((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) || in scm_check_creds() 60 gid_eq(gid, cred->sgid)) || ns_capable(cred->user_ns, CAP_SETGID))) { in scm_check_creds()
|
D | sock.c | 1568 static const struct cred *sk_get_peer_cred(struct sock *sk) in sk_get_peer_cred() 1570 const struct cred *cred; in sk_get_peer_cred() local 1573 cred = get_cred(sk->sk_peer_cred); in sk_get_peer_cred() 1576 return cred; in sk_get_peer_cred() 1579 static void cred_to_ucred(struct pid *pid, const struct cred *cred, in cred_to_ucred() argument 1584 if (cred) { in cred_to_ucred() 1587 ucred->uid = from_kuid_munged(current_ns, cred->euid); in cred_to_ucred() 1588 ucred->gid = from_kgid_munged(current_ns, cred->egid); in cred_to_ucred() 1815 const struct cred *cred; in sk_getsockopt() local 1818 cred = sk_get_peer_cred(sk); in sk_getsockopt() [all …]
|
D | net_namespace.c | 1391 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in netns_install()
|
/net/rxrpc/ |
D | key.c | 483 const struct cred *cred = current_cred(); in rxrpc_get_server_data_key() local 495 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, 0, in rxrpc_get_server_data_key() 537 const struct cred *cred = current_cred(); in rxrpc_get_null_key() local 542 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in rxrpc_get_null_key()
|
/net/netfilter/ |
D | nf_log_syslog.c | 173 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()
|
D | nfnetlink_log.c | 617 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()
|
D | nfnetlink_queue.c | 285 const struct cred *cred; in nfqnl_put_sk_uidgid() local 292 cred = sk->sk_socket->file->f_cred; in nfqnl_put_sk_uidgid() 294 htonl(from_kuid_munged(&init_user_ns, cred->fsuid)))) in nfqnl_put_sk_uidgid() 297 htonl(from_kgid_munged(&init_user_ns, cred->fsgid)))) in nfqnl_put_sk_uidgid()
|
/net/bluetooth/ |
D | af_bluetooth.c | 190 const struct cred *old_cred; in bt_accept_enqueue()
|
/net/unix/ |
D | af_unix.c | 680 const struct cred *old_cred; in init_peercred() 696 const struct cred *old_cred; in copy_peercred()
|