Lines Matching refs:rsci
349 static void rsc_free(struct rsc *rsci)
351 kfree(rsci->handle.data);
352 if (rsci->mechctx)
353 gss_delete_sec_context(&rsci->mechctx);
354 if (rsci->cred.cr_group_info)
355 put_group_info(rsci->cred.cr_group_info);
356 kfree(rsci->client_name);
361 struct rsc *rsci = container_of(ref, struct rsc, h.ref);
363 rsc_free(rsci);
364 kfree(rsci);
368 rsc_hash(struct rsc *rsci)
370 return hash_mem(rsci->handle.data, rsci->handle.len, RSC_HASHBITS);
416 struct rsc *rsci = kmalloc(sizeof(*rsci), GFP_KERNEL);
417 if (rsci)
418 return &rsci->h;
429 struct rsc rsci, *rscp = NULL;
434 memset(&rsci, 0, sizeof(rsci));
439 if (dup_to_netobj(&rsci.handle, buf, len))
442 rsci.h.flags = 0;
449 rscp = rsc_lookup(&rsci);
454 rv = get_int(&mesg, &rsci.cred.cr_uid);
458 set_bit(CACHE_NEGATIVE, &rsci.h.flags);
463 if (get_int(&mesg, &rsci.cred.cr_gid))
470 rsci.cred.cr_group_info = groups_alloc(N);
471 if (rsci.cred.cr_group_info == NULL)
480 GROUP_AT(rsci.cred.cr_group_info, i) = gid;
497 status = gss_import_sec_context(buf, len, gm, &rsci.mechctx, GFP_KERNEL);
504 rsci.client_name = kstrdup(buf, GFP_KERNEL);
505 if (!rsci.client_name)
510 rsci.h.expiry_time = expiry;
511 rscp = rsc_update(&rsci, rscp);
515 rsc_free(&rsci);
565 struct rsc rsci;
568 memset(&rsci, 0, sizeof(rsci));
569 if (dup_to_netobj(&rsci.handle, handle->data, handle->len))
571 found = rsc_lookup(&rsci);
572 rsc_free(&rsci);
582 gss_check_seq_num(struct rsc *rsci, int seq_num)
584 struct gss_svc_seq_data *sd = &rsci->seqdata;
656 gss_verify_header(struct svc_rqst *rqstp, struct rsc *rsci,
659 struct gss_ctx *ctx_id = rsci->mechctx;
693 if (!gss_check_seq_num(rsci, gc->gc_seq)) {
930 struct rsc *rsci;
937 if (gd && gd->rsci)
938 return gd->rsci->client_name;
947 struct rsc *rsci = svcdata->rsci;
960 rqstp->rq_gssclient = find_gss_auth_domain(rsci->mechctx, gc->gc_svc);
972 struct rsc *rsci;
977 rsci = gss_svc_searchbyctx(&rsip->out_handle);
978 if (rsci == NULL) {
982 rc = gss_write_verf(rqstp, rsci->mechctx, GSS_SEQ_WIN);
983 cache_put(&rsci->h, &rsc_cache);
1080 struct rsc *rsci = NULL;
1095 svcdata->rsci = NULL;
1134 rsci = gss_svc_searchbyctx(&gc->gc_ctx);
1135 if (!rsci)
1137 switch (gss_verify_header(rqstp, rsci, rpcstart, gc, authp)) {
1154 if (gss_write_verf(rqstp, rsci->mechctx, gc->gc_seq))
1156 rsci->h.expiry_time = get_seconds();
1157 set_bit(CACHE_NEGATIVE, &rsci->h.flags);
1165 if (gss_write_verf(rqstp, rsci->mechctx, gc->gc_seq))
1167 rqstp->rq_cred = rsci->cred;
1168 get_group_info(rsci->cred.cr_group_info);
1178 gc->gc_seq, rsci->mechctx))
1186 gc->gc_seq, rsci->mechctx))
1192 svcdata->rsci = rsci;
1193 cache_get(&rsci->h);
1195 rsci->mechctx->mech_type, gc->gc_svc);
1213 if (rsci)
1214 cache_put(&rsci->h, &rsc_cache);
1280 if (gss_get_mic(gsd->rsci->mechctx, &integ_buf, &mic))
1347 if (gss_wrap(gsd->rsci->mechctx, offset, resbuf, inpages))
1404 if (gsd->rsci)
1405 cache_put(&gsd->rsci->h, &rsc_cache);
1406 gsd->rsci = NULL;