/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 | 682 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_set_client() local 728 gi = unix_gid_find(cred->cr_uid, rqstp); in svcauth_unix_set_client() 737 put_group_info(cred->cr_group_info); in svcauth_unix_set_client() 738 cred->cr_group_info = gi; in svcauth_unix_set_client() 750 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_null_accept() local 767 cred->cr_uid = INVALID_UID; in svcauth_null_accept() 768 cred->cr_gid = INVALID_GID; in svcauth_null_accept() 769 cred->cr_group_info = groups_alloc(0); in svcauth_null_accept() 770 if (cred->cr_group_info == NULL) in svcauth_null_accept() 810 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 359 .cred = cred, in rpcb_create()
|
D | svc_xprt.c | 273 const struct cred *cred) in _svc_create_xprt() argument 294 newxprt->xpt_cred = get_cred(cred); in _svc_create_xprt() 309 const struct cred *cred) in svc_create_xprt() argument 313 err = _svc_create_xprt(serv, xprt_name, net, family, port, flags, cred); in svc_create_xprt() 316 err = _svc_create_xprt(serv, xprt_name, net, family, port, flags, cred); in svc_create_xprt()
|
D | clnt.c | 393 clnt->cl_cred = get_cred(args->cred); in rpc_new_client() 667 .cred = clnt->cl_cred, in rpc_clone_client() 689 .cred = clnt->cl_cred, in rpc_clone_client_set_auth() 969 .cred = old->cl_cred, in rpc_bind_new_program() 2690 struct rpc_xprt *xprt, struct rpc_cred *cred, int flags, in rpc_call_null_helper() argument 2700 .rpc_op_cred = cred, in rpc_call_null_helper() 2710 struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags) in rpc_call_null() argument 2712 return rpc_call_null_helper(clnt, NULL, cred, flags, NULL, NULL); in rpc_call_null()
|
D | svcsock.c | 1374 const size_t len, const struct cred *cred) in svc_addsock() argument 1407 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 | 345 struct svc_cred cred; member 359 free_svc_cred(&rsci->cred); in rsc_free() 376 free_svc_cred(&rsci->cred); in rsc_put() 406 init_svc_cred(&new->cred); in rsc_init() 419 new->cred = tmp->cred; in update_rsc() 420 init_svc_cred(&tmp->cred); in update_rsc() 487 rsci.cred.cr_uid = make_kuid(current_user_ns(), id); in rsc_parse() 492 rsci.cred.cr_gid = make_kgid(current_user_ns(), id); in rsc_parse() 500 rsci.cred.cr_group_info = groups_alloc(N); in rsc_parse() 501 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 | 1261 static const struct cred *sk_get_peer_cred(struct sock *sk) in sk_get_peer_cred() 1263 const struct cred *cred; in sk_get_peer_cred() local 1266 cred = get_cred(sk->sk_peer_cred); in sk_get_peer_cred() 1269 return cred; in sk_get_peer_cred() 1272 static void cred_to_ucred(struct pid *pid, const struct cred *cred, in cred_to_ucred() argument 1277 if (cred) { in cred_to_ucred() 1280 ucred->uid = from_kuid_munged(current_ns, cred->euid); in cred_to_ucred() 1281 ucred->gid = from_kgid_munged(current_ns, cred->egid); in cred_to_ucred() 1459 const struct cred *cred; in sk_getsockopt() local 1462 cred = sk_get_peer_cred(sk); in sk_getsockopt() [all …]
|
D | net_namespace.c | 1378 !ns_capable(nsset->cred->user_ns, CAP_SYS_ADMIN)) in netns_install()
|
/net/netfilter/ |
D | nf_log_common.c | 140 const struct cred *cred = sk->sk_socket->file->f_cred; in nf_log_dump_sk_uid_gid() local 142 from_kuid_munged(&init_user_ns, cred->fsuid), in nf_log_dump_sk_uid_gid() 143 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 | 602 const struct cred *cred = file->f_cred; in __build_packet_message() local 604 __be32 uid = htonl(from_kuid_munged(user_ns, cred->fsuid)); in __build_packet_message() 605 __be32 gid = htonl(from_kgid_munged(user_ns, cred->fsgid)); in __build_packet_message()
|
/net/rxrpc/ |
D | key.c | 964 const struct cred *cred = current_cred(); in rxrpc_get_server_data_key() local 976 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, 0, in rxrpc_get_server_data_key() 1018 const struct cred *cred = current_cred(); in rxrpc_get_null_key() local 1023 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in rxrpc_get_null_key()
|
/net/unix/ |
D | af_unix.c | 596 const struct cred *old_cred; in init_peercred() 612 const struct cred *old_cred; in copy_peercred()
|