Lines Matching refs:cred

136 	struct authdes_cred	*cred;  in __svcauth_des()  local
163 cred = (struct authdes_cred *)&area->area_cred; in __svcauth_des()
172 cred->adc_namekind = IXDR_GET_ENUM(ixdr, enum authdes_namekind); in __svcauth_des()
173 switch (cred->adc_namekind) { in __svcauth_des()
178 cred->adc_fullname.name = area->area_netname; in __svcauth_des()
179 (void) memcpy(cred->adc_fullname.name, ixdr, (uint_t)namelen); in __svcauth_des()
180 cred->adc_fullname.name[namelen] = 0; in __svcauth_des()
182 cred->adc_fullname.key.key.high = (uint32_t)*ixdr++; in __svcauth_des()
183 cred->adc_fullname.key.key.low = (uint32_t)*ixdr++; in __svcauth_des()
184 cred->adc_fullname.window = (uint32_t)*ixdr++; in __svcauth_des()
188 cred->adc_nickname = (uint32_t)*ixdr++; in __svcauth_des()
215 init_sessionkey = cred->adc_fullname.key; in __svcauth_des()
218 if (!__getpublickey_cached(cred->adc_fullname.name, in __svcauth_des()
231 cred->adc_fullname.name); in __svcauth_des()
242 (void) strcpy(cred->adc_fullname.name, "nobody"); in __svcauth_des()
246 if (key_decryptsession_pk(cred->adc_fullname.name, &pkey, in __svcauth_des()
249 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
254 cred->adc_fullname.name); in __svcauth_des()
259 sid = cred->adc_nickname; in __svcauth_des()
279 cryptbuf[1].key.high = cred->adc_fullname.window; in __svcauth_des()
291 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
295 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
325 cred->adc_fullname.name); in __svcauth_des()
330 cred->adc_fullname.name); in __svcauth_des()
336 cred->adc_fullname.name, in __svcauth_des()
342 cred->adc_fullname.name); in __svcauth_des()
354 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
359 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
368 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
373 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
382 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
387 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
414 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
437 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
450 if (cred->adc_namekind == ADN_FULLNAME) { in __svcauth_des()
451 cred->adc_fullname.window = window; in __svcauth_des()
452 cred->adc_nickname = sid; /* save nickname */ in __svcauth_des()
455 entry->rname = malloc(strlen(cred->adc_fullname.name) + 1); in __svcauth_des()
457 (void) strcpy(entry->rname, cred->adc_fullname.name); in __svcauth_des()
471 cred->adc_namekind = ADN_FULLNAME; in __svcauth_des()
472 cred->adc_fullname.name = entry->rname; in __svcauth_des()
473 cred->adc_fullname.key = entry->key; in __svcauth_des()
474 cred->adc_fullname.window = entry->window; in __svcauth_des()
622 invalidate(char *cred) in invalidate() argument
624 if (cred == NULL) in invalidate()
627 ((struct bsdcred *)cred)->grouplen = INVALID; in invalidate()
645 struct bsdcred *cred; in authdes_getucred() local
654 cred = (struct bsdcred *)_rpc_authdes_cache[sid].localcred; in authdes_getucred()
655 if (cred == NULL) { in authdes_getucred()
662 cred = malloc(bsdcred_sz); in authdes_getucred()
663 if (cred == NULL) { in authdes_getucred()
668 _rpc_authdes_cache[sid].localcred = (char *)cred; in authdes_getucred()
669 cred->grouplen = INVALID; in authdes_getucred()
671 if (cred->grouplen == INVALID) { in authdes_getucred()
679 cred->grouplen = UNKNOWN; in authdes_getucred()
684 *uid = cred->uid = i_uid; in authdes_getucred()
685 *gid = cred->gid = i_gid; in authdes_getucred()
686 *grouplen = cred->grouplen = i_grouplen; in authdes_getucred()
688 cred->groups[i] = groups[i]; in authdes_getucred()
693 if (cred->grouplen == UNKNOWN) { in authdes_getucred()
704 *uid = cred->uid; in authdes_getucred()
705 *gid = cred->gid; in authdes_getucred()
706 *grouplen = cred->grouplen; in authdes_getucred()
707 for (i = cred->grouplen - 1; i >= 0; i--) { in authdes_getucred()
708 groups[i] = cred->groups[i]; in authdes_getucred()