Lines Matching refs:cred
135 struct authdes_cred *cred; in __svcauth_des() local
162 cred = (struct authdes_cred *)&area->area_cred; in __svcauth_des()
171 cred->adc_namekind = IXDR_GET_ENUM(ixdr, enum authdes_namekind); in __svcauth_des()
172 switch (cred->adc_namekind) { in __svcauth_des()
177 cred->adc_fullname.name = area->area_netname; in __svcauth_des()
178 (void) memcpy(cred->adc_fullname.name, ixdr, (uint_t)namelen); in __svcauth_des()
179 cred->adc_fullname.name[namelen] = 0; in __svcauth_des()
181 cred->adc_fullname.key.key.high = (uint32_t)*ixdr++; in __svcauth_des()
182 cred->adc_fullname.key.key.low = (uint32_t)*ixdr++; in __svcauth_des()
183 cred->adc_fullname.window = (uint32_t)*ixdr++; in __svcauth_des()
187 cred->adc_nickname = (uint32_t)*ixdr++; in __svcauth_des()
214 init_sessionkey = cred->adc_fullname.key; in __svcauth_des()
217 if (!__getpublickey_cached(cred->adc_fullname.name, in __svcauth_des()
230 cred->adc_fullname.name); in __svcauth_des()
241 (void) strcpy(cred->adc_fullname.name, "nobody"); in __svcauth_des()
245 if (key_decryptsession_pk(cred->adc_fullname.name, &pkey, in __svcauth_des()
248 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
253 cred->adc_fullname.name); in __svcauth_des()
258 sid = cred->adc_nickname; in __svcauth_des()
278 cryptbuf[1].key.high = cred->adc_fullname.window; in __svcauth_des()
290 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
294 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
324 cred->adc_fullname.name); in __svcauth_des()
329 cred->adc_fullname.name); in __svcauth_des()
335 cred->adc_fullname.name, in __svcauth_des()
341 cred->adc_fullname.name); in __svcauth_des()
353 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
358 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
367 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
372 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
381 __getpublickey_flush(cred->adc_fullname.name); in __svcauth_des()
386 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
413 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
436 fullname_rcvd ? cred->adc_fullname.name : in __svcauth_des()
449 if (cred->adc_namekind == ADN_FULLNAME) { in __svcauth_des()
450 cred->adc_fullname.window = window; in __svcauth_des()
451 cred->adc_nickname = sid; /* save nickname */ in __svcauth_des()
454 entry->rname = malloc(strlen(cred->adc_fullname.name) + 1); in __svcauth_des()
456 (void) strcpy(entry->rname, cred->adc_fullname.name); in __svcauth_des()
470 cred->adc_namekind = ADN_FULLNAME; in __svcauth_des()
471 cred->adc_fullname.name = entry->rname; in __svcauth_des()
472 cred->adc_fullname.key = entry->key; in __svcauth_des()
473 cred->adc_fullname.window = entry->window; in __svcauth_des()
621 invalidate(char *cred) in invalidate() argument
623 if (cred == NULL) in invalidate()
626 ((struct bsdcred *)cred)->grouplen = INVALID; in invalidate()
644 struct bsdcred *cred; in authdes_getucred() local
653 cred = (struct bsdcred *)_rpc_authdes_cache[sid].localcred; in authdes_getucred()
654 if (cred == NULL) { in authdes_getucred()
661 cred = malloc(bsdcred_sz); in authdes_getucred()
662 if (cred == NULL) { in authdes_getucred()
667 _rpc_authdes_cache[sid].localcred = (char *)cred; in authdes_getucred()
668 cred->grouplen = INVALID; in authdes_getucred()
670 if (cred->grouplen == INVALID) { in authdes_getucred()
678 cred->grouplen = UNKNOWN; in authdes_getucred()
683 *uid = cred->uid = i_uid; in authdes_getucred()
684 *gid = cred->gid = i_gid; in authdes_getucred()
685 *grouplen = cred->grouplen = i_grouplen; in authdes_getucred()
687 cred->groups[i] = groups[i]; in authdes_getucred()
692 if (cred->grouplen == UNKNOWN) { in authdes_getucred()
703 *uid = cred->uid; in authdes_getucred()
704 *gid = cred->gid; in authdes_getucred()
705 *grouplen = cred->grouplen; in authdes_getucred()
706 for (i = cred->grouplen - 1; i >= 0; i--) { in authdes_getucred()
707 groups[i] = cred->groups[i]; in authdes_getucred()