Home
last modified time | relevance | path

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

/net/sunrpc/
Dauth.c298 rpcauth_unhash_cred_locked(struct rpc_cred *cred) in rpcauth_unhash_cred_locked() argument
300 hlist_del_rcu(&cred->cr_hash); in rpcauth_unhash_cred_locked()
302 clear_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags); in rpcauth_unhash_cred_locked()
306 rpcauth_unhash_cred(struct rpc_cred *cred) in rpcauth_unhash_cred() argument
311 cache_lock = &cred->cr_auth->au_credcache->lock; in rpcauth_unhash_cred()
313 ret = atomic_read(&cred->cr_count) == 0; in rpcauth_unhash_cred()
315 rpcauth_unhash_cred_locked(cred); in rpcauth_unhash_cred()
351 rpcauth_key_timeout_notify(struct rpc_auth *auth, struct rpc_cred *cred) in rpcauth_key_timeout_notify() argument
353 if (!cred->cr_auth->au_ops->key_timeout) in rpcauth_key_timeout_notify()
355 return cred->cr_auth->au_ops->key_timeout(auth, cred); in rpcauth_key_timeout_notify()
[all …]
Dauth_unix.c69 struct unx_cred *cred; in unx_create_cred() local
77 if (!(cred = kmalloc(sizeof(*cred), gfp))) in unx_create_cred()
80 rpcauth_init_cred(&cred->uc_base, acred, auth, &unix_credops); in unx_create_cred()
81 cred->uc_base.cr_flags = 1UL << RPCAUTH_CRED_UPTODATE; in unx_create_cred()
88 cred->uc_gid = acred->gid; in unx_create_cred()
90 cred->uc_gids[i] = acred->group_info->gid[i]; in unx_create_cred()
92 cred->uc_gids[i] = INVALID_GID; in unx_create_cred()
94 return &cred->uc_base; in unx_create_cred()
112 unx_destroy_cred(struct rpc_cred *cred) in unx_destroy_cred() argument
114 call_rcu(&cred->cr_rcu, unx_free_cred_callback); in unx_destroy_cred()
[all …]
Dauth_generic.c73 struct rpc_cred *cred, int lookupflags) in generic_bind_cred() argument
76 struct auth_cred *acred = &container_of(cred, struct generic_cred, gc_base)->acred; in generic_bind_cred()
128 generic_free_cred(struct rpc_cred *cred) in generic_free_cred() argument
130 struct generic_cred *gcred = container_of(cred, struct generic_cred, gc_base); in generic_free_cred()
141 struct rpc_cred *cred = container_of(head, struct rpc_cred, cr_rcu); in generic_free_cred_callback() local
142 generic_free_cred(cred); in generic_free_cred_callback()
146 generic_destroy_cred(struct rpc_cred *cred) in generic_destroy_cred() argument
148 call_rcu(&cred->cr_rcu, generic_free_cred_callback); in generic_destroy_cred()
166 generic_match(struct auth_cred *acred, struct rpc_cred *cred, int flags) in generic_match() argument
168 struct generic_cred *gcred = container_of(cred, struct generic_cred, gc_base); in generic_match()
[all …]
Dsvcauth_unix.c662 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_set_client() local
708 gi = unix_gid_find(cred->cr_uid, rqstp); in svcauth_unix_set_client()
717 put_group_info(cred->cr_group_info); in svcauth_unix_set_client()
718 cred->cr_group_info = gi; in svcauth_unix_set_client()
730 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_null_accept() local
747 cred->cr_uid = INVALID_UID; in svcauth_null_accept()
748 cred->cr_gid = INVALID_GID; in svcauth_null_accept()
749 cred->cr_group_info = groups_alloc(0); in svcauth_null_accept()
750 if (cred->cr_group_info == NULL) in svcauth_null_accept()
790 struct svc_cred *cred = &rqstp->rq_cred; in svcauth_unix_accept() local
[all …]
Dauth_null.c47 nul_destroy_cred(struct rpc_cred *cred) in nul_destroy_cred() argument
55 nul_match(struct auth_cred *acred, struct rpc_cred *cred, int taskflags) in nul_match() argument
Dclnt.c2528 struct rpc_xprt *xprt, struct rpc_cred *cred, int flags, in rpc_call_null_helper() argument
2533 .rpc_cred = cred, in rpc_call_null_helper()
2547 struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, int flags) in rpc_call_null() argument
2549 return rpc_call_null_helper(clnt, NULL, cred, flags, NULL, NULL); in rpc_call_null()
2592 struct rpc_cred *cred; in rpc_clnt_test_and_add_xprt() local
2601 cred = authnull_ops.lookup_cred(NULL, NULL, 0); in rpc_clnt_test_and_add_xprt()
2602 task = rpc_call_null_helper(clnt, xprt, cred, in rpc_clnt_test_and_add_xprt()
2605 put_rpccred(cred); in rpc_clnt_test_and_add_xprt()
2636 struct rpc_cred *cred; in rpc_clnt_setup_test_and_add_xprt() local
2648 cred = authnull_ops.lookup_cred(NULL, NULL, 0); in rpc_clnt_setup_test_and_add_xprt()
[all …]
/net/sunrpc/auth_gss/
Dauth_gss.c137 gss_cred_set_ctx(struct rpc_cred *cred, struct gss_cl_ctx *ctx) in gss_cred_set_ctx() argument
139 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_set_ctx()
141 if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) in gss_cred_set_ctx()
145 set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_cred_set_ctx()
147 clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags); in gss_cred_set_ctx()
180 gss_cred_get_ctx(struct rpc_cred *cred) in gss_cred_get_ctx() argument
182 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_get_ctx()
532 gss_setup_upcall(struct gss_auth *gss_auth, struct rpc_cred *cred) in gss_setup_upcall() argument
534 struct gss_cred *gss_cred = container_of(cred, in gss_setup_upcall()
537 kuid_t uid = cred->cr_uid; in gss_setup_upcall()
[all …]
Dsvcauth_gss.c330 struct svc_cred cred; member
343 free_svc_cred(&rsci->cred); in rsc_free()
380 init_svc_cred(&new->cred); in rsc_init()
393 new->cred = tmp->cred; in update_rsc()
394 init_svc_cred(&tmp->cred); in update_rsc()
456 rsci.cred.cr_uid = make_kuid(&init_user_ns, id); in rsc_parse()
461 rsci.cred.cr_gid = make_kgid(&init_user_ns, id); in rsc_parse()
469 rsci.cred.cr_group_info = groups_alloc(N); in rsc_parse()
470 if (rsci.cred.cr_group_info == NULL) in rsc_parse()
482 rsci.cred.cr_group_info->gid[i] = kgid; in rsc_parse()
[all …]
Dgss_rpc_xdr.c552 struct gssx_cred *cred) in gssx_enc_cred() argument
557 err = gssx_enc_name(xdr, &cred->desired_name); in gssx_enc_cred()
562 err = dummy_enc_credel_array(xdr, &cred->elements); in gssx_enc_cred()
567 err = gssx_enc_buffer(xdr, &cred->cred_handle_reference); in gssx_enc_cred()
572 err = gssx_enc_bool(xdr, cred->needs_release); in gssx_enc_cred()
/net/dns_resolver/
Ddns_key.c45 const struct cred *dns_resolver_cache;
265 struct cred *cred; in init_dns_resolver() local
275 cred = prepare_kernel_cred(NULL); in init_dns_resolver()
276 if (!cred) in init_dns_resolver()
280 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in init_dns_resolver()
296 cred->thread_keyring = keyring; in init_dns_resolver()
297 cred->jit_keyring = KEY_REQKEY_DEFL_THREAD_KEYRING; in init_dns_resolver()
298 dns_resolver_cache = cred; in init_dns_resolver()
306 put_cred(cred); in init_dns_resolver()
Dinternal.h36 extern const struct cred *dns_resolver_cache;
Ddns_query.c74 const struct cred *saved_cred; in dns_query()
/net/core/
Dscm.c49 const struct cred *cred = current_cred(); in scm_check_creds() local
50 kuid_t uid = make_kuid(cred->user_ns, creds->uid); in scm_check_creds()
51 kgid_t gid = make_kgid(cred->user_ns, creds->gid); in scm_check_creds()
58 ((uid_eq(uid, cred->uid) || uid_eq(uid, cred->euid) || in scm_check_creds()
59 uid_eq(uid, cred->suid)) || ns_capable(cred->user_ns, CAP_SETUID)) && in scm_check_creds()
60 ((gid_eq(gid, cred->gid) || gid_eq(gid, cred->egid) || in scm_check_creds()
61 gid_eq(gid, cred->sgid)) || ns_capable(cred->user_ns, CAP_SETGID))) { in scm_check_creds()
Dsock.c1014 static void cred_to_ucred(struct pid *pid, const struct cred *cred, in cred_to_ucred() argument
1019 if (cred) { in cred_to_ucred()
1022 ucred->uid = from_kuid_munged(current_ns, cred->euid); in cred_to_ucred()
1023 ucred->gid = from_kgid_munged(current_ns, cred->egid); in cred_to_ucred()
/net/netfilter/
Dnf_log_common.c142 const struct cred *cred = sk->sk_socket->file->f_cred; in nf_log_dump_sk_uid_gid() local
144 from_kuid_munged(&init_user_ns, cred->fsuid), in nf_log_dump_sk_uid_gid()
145 from_kgid_munged(&init_user_ns, cred->fsgid)); in nf_log_dump_sk_uid_gid()
Dnfnetlink_log.c557 const struct cred *cred = file->f_cred; in __build_packet_message() local
559 __be32 uid = htonl(from_kuid_munged(user_ns, cred->fsuid)); in __build_packet_message()
560 __be32 gid = htonl(from_kgid_munged(user_ns, cred->fsgid)); in __build_packet_message()
Dnfnetlink_queue.c258 const struct cred *cred; in nfqnl_put_sk_uidgid() local
265 cred = sk->sk_socket->file->f_cred; in nfqnl_put_sk_uidgid()
267 htonl(from_kuid_munged(&init_user_ns, cred->fsuid)))) in nfqnl_put_sk_uidgid()
270 htonl(from_kgid_munged(&init_user_ns, cred->fsgid)))) in nfqnl_put_sk_uidgid()
/net/rxrpc/
Dkey.c961 const struct cred *cred = current_cred(); in rxrpc_get_server_data_key() local
973 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, 0, in rxrpc_get_server_data_key()
1015 const struct cred *cred = current_cred(); in rxrpc_get_null_key() local
1020 GLOBAL_ROOT_UID, GLOBAL_ROOT_GID, cred, in rxrpc_get_null_key()