Lines Matching refs:cred

117 gss_cred_set_ctx(struct rpc_cred *cred, struct gss_cl_ctx *ctx)  in gss_cred_set_ctx()  argument
119 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_set_ctx()
121 if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) in gss_cred_set_ctx()
125 set_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_cred_set_ctx()
127 clear_bit(RPCAUTH_CRED_NEW, &cred->cr_flags); in gss_cred_set_ctx()
131 gss_cred_get_ctx(struct rpc_cred *cred) in gss_cred_get_ctx() argument
133 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_get_ctx()
390 const struct cred *cred) in gss_encode_v0_msg() argument
392 struct user_namespace *userns = cred->user_ns; in gss_encode_v0_msg()
417 const struct cred *cred) in gss_encode_v1_msg() argument
419 struct user_namespace *userns = cred->user_ns; in gss_encode_v1_msg()
546 gss_setup_upcall(struct gss_auth *gss_auth, struct rpc_cred *cred) in gss_setup_upcall() argument
548 struct gss_cred *gss_cred = container_of(cred, in gss_setup_upcall()
551 kuid_t uid = cred->cr_cred->fsuid; in gss_setup_upcall()
580 struct rpc_cred *cred = task->tk_rqstp->rq_cred; in gss_refresh_upcall() local
581 struct gss_auth *gss_auth = container_of(cred->cr_auth, in gss_refresh_upcall()
583 struct gss_cred *gss_cred = container_of(cred, in gss_refresh_upcall()
589 gss_msg = gss_setup_upcall(gss_auth, cred); in gss_refresh_upcall()
620 cred->cr_cred->fsuid), err); in gss_refresh_upcall()
630 struct rpc_cred *cred = &gss_cred->gc_base; in gss_create_upcall() local
643 gss_msg = gss_setup_upcall(gss_auth, cred); in gss_create_upcall()
675 gss_cred_set_ctx(cred, gss_msg->ctx); in gss_create_upcall()
685 cred->cr_cred->fsuid), err); in gss_create_upcall()
1241 .cred = gss_cred->gc_base.cr_cred, in gss_dup_cred()
1266 gss_send_destroy_context(struct rpc_cred *cred) in gss_send_destroy_context() argument
1268 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_send_destroy_context()
1269 struct gss_auth *gss_auth = container_of(cred->cr_auth, struct gss_auth, rpc_auth); in gss_send_destroy_context()
1327 gss_destroy_nullcred(struct rpc_cred *cred) in gss_destroy_nullcred() argument
1329 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_destroy_nullcred()
1330 struct gss_auth *gss_auth = container_of(cred->cr_auth, struct gss_auth, rpc_auth); in gss_destroy_nullcred()
1334 put_cred(cred->cr_cred); in gss_destroy_nullcred()
1335 call_rcu(&cred->cr_rcu, gss_free_cred_callback); in gss_destroy_nullcred()
1342 gss_destroy_cred(struct rpc_cred *cred) in gss_destroy_cred() argument
1344 if (test_and_clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) != 0) in gss_destroy_cred()
1345 gss_send_destroy_context(cred); in gss_destroy_cred()
1346 gss_destroy_nullcred(cred); in gss_destroy_cred()
1352 return hash_64(from_kuid(&init_user_ns, acred->cred->fsuid), hashbits); in gss_hash_cred()
1369 struct gss_cred *cred = NULL; in gss_create_cred() local
1372 if (!(cred = kzalloc(sizeof(*cred), gfp))) in gss_create_cred()
1375 rpcauth_init_cred(&cred->gc_base, acred, auth, &gss_credops); in gss_create_cred()
1380 cred->gc_base.cr_flags = 1UL << RPCAUTH_CRED_NEW; in gss_create_cred()
1381 cred->gc_service = gss_auth->service; in gss_create_cred()
1382 cred->gc_principal = acred->principal; in gss_create_cred()
1384 return &cred->gc_base; in gss_create_cred()
1391 gss_cred_init(struct rpc_auth *auth, struct rpc_cred *cred) in gss_cred_init() argument
1394 struct gss_cred *gss_cred = container_of(cred,struct gss_cred, gc_base); in gss_cred_init()
1404 gss_stringify_acceptor(struct rpc_cred *cred) in gss_stringify_acceptor() argument
1407 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_stringify_acceptor()
1506 ret = uid_eq(rc->cr_cred->fsuid, acred->cred->fsuid); in gss_match()
1521 struct rpc_cred *cred = req->rq_cred; in gss_marshal() local
1522 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, in gss_marshal()
1524 struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); in gss_marshal()
1580 clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_marshal()
1600 .cred = oldcred->cr_cred, in gss_renew_cred()
1614 static int gss_cred_is_negative_entry(struct rpc_cred *cred) in gss_cred_is_negative_entry() argument
1616 if (test_bit(RPCAUTH_CRED_NEGATIVE, &cred->cr_flags)) { in gss_cred_is_negative_entry()
1621 gss_cred = container_of(cred, struct gss_cred, gc_base); in gss_cred_is_negative_entry()
1637 struct rpc_cred *cred = task->tk_rqstp->rq_cred; in gss_refresh() local
1640 if (gss_cred_is_negative_entry(cred)) in gss_refresh()
1643 if (!test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags) && in gss_refresh()
1644 !test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags)) { in gss_refresh()
1648 cred = task->tk_rqstp->rq_cred; in gss_refresh()
1651 if (test_bit(RPCAUTH_CRED_NEW, &cred->cr_flags)) in gss_refresh()
1667 struct rpc_cred *cred = task->tk_rqstp->rq_cred; in gss_validate() local
1668 struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); in gss_validate()
1699 clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_validate()
1705 if (test_bit(RPCAUTH_AUTH_UPDATE_SLACK, &cred->cr_auth->au_flags)) in gss_validate()
1706 cred->cr_auth->au_verfsize = XDR_QUADLEN(len) + 2; in gss_validate()
1723 gss_wrap_req_integ(struct rpc_cred *cred, struct gss_cl_ctx *ctx, in gss_wrap_req_integ() argument
1753 clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_wrap_req_integ()
1816 gss_wrap_req_priv(struct rpc_cred *cred, struct gss_cl_ctx *ctx, in gss_wrap_req_priv() argument
1866 clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_wrap_req_priv()
1892 struct rpc_cred *cred = task->tk_rqstp->rq_cred; in gss_wrap_req() local
1893 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, in gss_wrap_req()
1895 struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); in gss_wrap_req()
1911 status = gss_wrap_req_integ(cred, ctx, task, xdr); in gss_wrap_req()
1914 status = gss_wrap_req_priv(cred, ctx, task, xdr); in gss_wrap_req()
1932 static void gss_update_rslack(struct rpc_task *task, struct rpc_cred *cred, in gss_update_rslack() argument
1935 struct rpc_auth *auth = cred->cr_auth; in gss_update_rslack()
1945 gss_unwrap_resp_auth(struct rpc_task *task, struct rpc_cred *cred) in gss_unwrap_resp_auth() argument
1947 gss_update_rslack(task, cred, 0, 0); in gss_unwrap_resp_auth()
1965 gss_unwrap_resp_integ(struct rpc_task *task, struct rpc_cred *cred, in gss_unwrap_resp_integ() argument
2014 clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_unwrap_resp_integ()
2018 gss_update_rslack(task, cred, 2, 2 + 1 + XDR_QUADLEN(mic.len)); in gss_unwrap_resp_integ()
2037 gss_unwrap_resp_priv(struct rpc_task *task, struct rpc_cred *cred, in gss_unwrap_resp_priv() argument
2057 clear_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags); in gss_unwrap_resp_priv()
2069 gss_update_rslack(task, cred, 2 + ctx->gc_gss_ctx->align, in gss_unwrap_resp_priv()
2094 struct rpc_cred *cred = req->rq_cred; in gss_xmit_need_reencode() local
2095 struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); in gss_xmit_need_reencode()
2131 struct rpc_cred *cred = rqstp->rq_cred; in gss_unwrap_resp() local
2132 struct gss_cred *gss_cred = container_of(cred, struct gss_cred, in gss_unwrap_resp()
2134 struct gss_cl_ctx *ctx = gss_cred_get_ctx(cred); in gss_unwrap_resp()
2141 status = gss_unwrap_resp_auth(task, cred); in gss_unwrap_resp()
2144 status = gss_unwrap_resp_integ(task, cred, ctx, rqstp, xdr); in gss_unwrap_resp()
2147 status = gss_unwrap_resp_priv(task, cred, ctx, rqstp, xdr); in gss_unwrap_resp()