/net/sunrpc/ |
D | auth.c | 41 static struct cred machine_cred = { 52 const struct cred *rpc_machine_cred(void) in rpc_machine_cred() 264 rpcauth_unhash_cred_locked(struct rpc_cred *cred) in rpcauth_unhash_cred_locked() argument 266 if (!test_and_clear_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags)) in rpcauth_unhash_cred_locked() 268 hlist_del_rcu(&cred->cr_hash); in rpcauth_unhash_cred_locked() 273 rpcauth_unhash_cred(struct rpc_cred *cred) in rpcauth_unhash_cred() argument 278 if (!test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags)) in rpcauth_unhash_cred() 280 cache_lock = &cred->cr_auth->au_credcache->lock; in rpcauth_unhash_cred() 282 ret = rpcauth_unhash_cred_locked(cred); in rpcauth_unhash_cred() 315 rpcauth_stringify_acceptor(struct rpc_cred *cred) in rpcauth_stringify_acceptor() argument [all …]
|
D | auth_unix.c | 63 unx_destroy_cred(struct rpc_cred *cred) in unx_destroy_cred() argument 65 call_rcu(&cred->cr_rcu, unx_free_cred_callback); in unx_destroy_cred() 72 unx_match(struct auth_cred *acred, struct rpc_cred *cred, int flags) in unx_match() argument 77 if (cred->cr_cred == acred->cred) in unx_match() 80 …if (!uid_eq(cred->cr_cred->fsuid, acred->cred->fsuid) || !gid_eq(cred->cr_cred->fsgid, acred->cred… in unx_match() 83 if (acred->cred->group_info != NULL) in unx_match() 84 groups = acred->cred->group_info->ngroups; in unx_match() 87 if (cred->cr_cred->group_info == NULL) in unx_match() 89 if (groups != cred->cr_cred->group_info->ngroups) in unx_match() 93 if (!gid_eq(cred->cr_cred->group_info->gid[i], acred->cred->group_info->gid[i])) in unx_match() [all …]
|
D | svcauth_unix.c | 673 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_set_client() local 720 gi = unix_gid_find(cred->cr_uid, rqstp); in svcauth_unix_set_client() 729 put_group_info(cred->cr_group_info); in svcauth_unix_set_client() 730 cred->cr_group_info = gi; in svcauth_unix_set_client() 745 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_null_accept() local 762 cred->cr_uid = INVALID_UID; in svcauth_null_accept() 763 cred->cr_gid = INVALID_GID; in svcauth_null_accept() 764 cred->cr_group_info = groups_alloc(0); in svcauth_null_accept() 765 if (cred->cr_group_info == NULL) in svcauth_null_accept() 805 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_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 | rpcb_clnt.c | 238 .cred = current_cred(), in rpcb_create_local_unix() 292 .cred = current_cred(), in rpcb_create_local_net() 347 const struct cred *cred, in rpcb_create() argument 361 .cred = cred, in rpcb_create()
|
D | svc_xprt.c | 292 const struct cred *cred) in _svc_create_xprt() argument 313 newxprt->xpt_cred = get_cred(cred); in _svc_create_xprt() 328 const struct cred *cred) in svc_create_xprt() argument 332 err = _svc_create_xprt(serv, xprt_name, net, family, port, flags, cred); in svc_create_xprt() 335 err = _svc_create_xprt(serv, xprt_name, net, family, port, flags, cred); in svc_create_xprt()
|
D | clnt.c | 396 clnt->cl_cred = get_cred(args->cred); in rpc_new_client() 679 .cred = clnt->cl_cred, in rpc_clone_client() 701 .cred = clnt->cl_cred, in rpc_clone_client_set_auth() 981 .cred = old->cl_cred, in rpc_bind_new_program() 2733 struct rpc_xprt *xprt, struct rpc_cred *cred, int flags, in rpc_call_null_helper() argument 2743 .rpc_op_cred = cred, in rpc_call_null_helper() 2753 struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags) in rpc_call_null() argument 2755 return rpc_call_null_helper(clnt, NULL, cred, flags, NULL, NULL); in rpc_call_null()
|
D | svcsock.c | 1366 const size_t len, const struct cred *cred) in svc_addsock() argument 1399 svsk->sk_xprt.xpt_cred = get_cred(cred); in svc_addsock()
|
/net/sunrpc/auth_gss/ |
D | auth_gss.c | 116 gss_cred_set_ctx(struct rpc_cred *cred, struct gss_cl_ctx *ctx) in gss_cred_set_ctx() argument 118 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_set_ctx() 120 if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) in gss_cred_set_ctx() 124 set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_cred_set_ctx() 126 clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags); in gss_cred_set_ctx() 130 gss_cred_get_ctx(struct rpc_cred *cred) in gss_cred_get_ctx() argument 132 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_get_ctx() 389 const struct cred *cred) in gss_encode_v0_msg() argument 391 struct user_namespace *userns = cred->user_ns; in gss_encode_v0_msg() 416 const struct cred *cred) in gss_encode_v1_msg() argument [all …]
|
D | svcauth_gss.c | 347 struct svc_cred cred; member 361 free_svc_cred(&rsci->cred); in rsc_free() 378 free_svc_cred(&rsci->cred); in rsc_put() 408 init_svc_cred(&new->cred); in rsc_init() 421 new->cred = tmp->cred; in update_rsc() 422 init_svc_cred(&tmp->cred); in update_rsc() 489 rsci.cred.cr_uid = make_kuid(current_user_ns(), id); in rsc_parse() 494 rsci.cred.cr_gid = make_kgid(current_user_ns(), id); in rsc_parse() 502 rsci.cred.cr_group_info = groups_alloc(N); in rsc_parse() 503 if (rsci.cred.cr_group_info == NULL) in rsc_parse() [all …]
|
D | gss_rpc_xdr.c | 539 struct gssx_cred *cred) in gssx_enc_cred() argument 544 err = gssx_enc_name(xdr, &cred->desired_name); in gssx_enc_cred() 549 err = dummy_enc_credel_array(xdr, &cred->elements); in gssx_enc_cred() 554 err = gssx_enc_buffer(xdr, &cred->cred_handle_reference); in gssx_enc_cred() 559 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(NULL); 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 | 1385 static const struct cred *sk_get_peer_cred(struct sock *sk) in sk_get_peer_cred() 1387 const struct cred *cred; in sk_get_peer_cred() local 1390 cred = get_cred(sk->sk_peer_cred); in sk_get_peer_cred() 1393 return cred; in sk_get_peer_cred() 1396 static void cred_to_ucred(struct pid *pid, const struct cred *cred, in cred_to_ucred() argument 1401 if (cred) { in cred_to_ucred() 1404 ucred->uid = from_kuid_munged(current_ns, cred->euid); in cred_to_ucred() 1405 ucred->gid = from_kgid_munged(current_ns, cred->egid); in cred_to_ucred() 1590 const struct cred *cred; in sock_getsockopt() local 1593 cred = sk_get_peer_cred(sk); in sock_getsockopt() [all …]
|
D | net_namespace.c | 1365 !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 | 167 const struct cred *cred = sk->sk_socket->file->f_cred; in nf_log_dump_sk_uid_gid() local 170 from_kuid_munged(&init_user_ns, cred->fsuid), in nf_log_dump_sk_uid_gid() 171 from_kgid_munged(&init_user_ns, cred->fsgid)); in nf_log_dump_sk_uid_gid()
|
D | nfnetlink_queue.c | 281 const struct cred *cred; in nfqnl_put_sk_uidgid() local 288 cred = sk->sk_socket->file->f_cred; in nfqnl_put_sk_uidgid() 290 htonl(from_kuid_munged(&init_user_ns, cred->fsuid)))) in nfqnl_put_sk_uidgid() 293 htonl(from_kgid_munged(&init_user_ns, cred->fsgid)))) in nfqnl_put_sk_uidgid()
|
D | nfnetlink_log.c | 606 const struct cred *cred = file->f_cred; in __build_packet_message() local 608 __be32 uid = htonl(from_kuid_munged(user_ns, cred->fsuid)); in __build_packet_message() 609 __be32 gid = htonl(from_kgid_munged(user_ns, cred->fsgid)); in __build_packet_message()
|
/net/unix/ |
D | af_unix.c | 612 const struct cred *old_cred; in init_peercred() 628 const struct cred *old_cred; in copy_peercred()
|