Lines Matching defs:context

365 krb5_fcc_read(krb5_context context, krb5_ccache id, krb5_pointer buf, unsigned int len)
374 return krb5_fcc_interpret(context, errno);
397 return krb5_fcc_interpret(context, e);
447 krb5_fcc_read_principal(krb5_context context, krb5_ccache id, krb5_principal *princ)
463 kret = krb5_fcc_read_int32(context, id, &type);
469 kret = krb5_fcc_read_int32(context, id, &length);
502 kret = krb5_fcc_read_data(context, id, krb5_princ_realm(context, tmpprinc));
508 kret = krb5_fcc_read_data(context, id, krb5_princ_component(context, tmpprinc, i));
516 free(krb5_princ_component(context, tmpprinc, i)->data);
523 krb5_fcc_read_addrs(krb5_context context, krb5_ccache id, krb5_address ***addrs)
535 kret = krb5_fcc_read_int32(context, id, &length);
552 krb5_free_addresses(context, *addrs);
558 kret = krb5_fcc_read_addr(context, id, (*addrs)[i]);
565 krb5_free_addresses(context, *addrs);
572 krb5_fcc_read_keyblock(krb5_context context, krb5_ccache id, krb5_keyblock *keyblock)
584 kret = krb5_fcc_read_ui_2(context, id, &ui2);
589 kret = krb5_fcc_read_ui_2(context, id, &ui2);
594 kret = krb5_fcc_read_int32(context, id, &int32);
609 kret = krb5_fcc_read(context, id, keyblock->contents, keyblock->length);
623 krb5_fcc_read_data(krb5_context context, krb5_ccache id, krb5_data *data)
633 kret = krb5_fcc_read_int32(context, id, &len);
650 kret = krb5_fcc_read(context, id, data->data, (unsigned) data->length);
664 krb5_fcc_read_addr(krb5_context context, krb5_ccache id, krb5_address *addr)
675 kret = krb5_fcc_read_ui_2(context, id, &ui2);
679 kret = krb5_fcc_read_int32(context, id, &int32);
696 kret = krb5_fcc_read(context, id, addr->contents, addr->length);
709 krb5_fcc_read_int32(krb5_context context, krb5_ccache id, krb5_int32 *i)
720 return krb5_fcc_read(context, id, (krb5_pointer) i, sizeof(krb5_int32));
722 retval = krb5_fcc_read(context, id, buf, 4);
735 krb5_fcc_read_ui_2(krb5_context context, krb5_ccache id, krb5_ui_2 *i)
745 return krb5_fcc_read(context, id, (krb5_pointer) i, sizeof(krb5_ui_2));
747 retval = krb5_fcc_read(context, id, buf, 2);
756 krb5_fcc_read_octet(krb5_context context, krb5_ccache id, krb5_octet *i)
759 return krb5_fcc_read(context, id, (krb5_pointer) i, 1);
764 krb5_fcc_read_times(krb5_context context, krb5_ccache id, krb5_ticket_times *t)
774 return krb5_fcc_read(context, id, (krb5_pointer) t, sizeof(krb5_ticket_times));
776 retval = krb5_fcc_read_int32(context, id, &i);
780 retval = krb5_fcc_read_int32(context, id, &i);
784 retval = krb5_fcc_read_int32(context, id, &i);
788 retval = krb5_fcc_read_int32(context, id, &i);
798 krb5_fcc_read_authdata(krb5_context context, krb5_ccache id, krb5_authdata ***a)
810 kret = krb5_fcc_read_int32(context, id, &length);
830 krb5_free_authdata(context, *a);
834 kret = krb5_fcc_read_authdatum(context, id, (*a)[i]);
841 krb5_free_authdata(context, *a);
848 krb5_fcc_read_authdatum(krb5_context context, krb5_ccache id, krb5_authdata *a)
859 kret = krb5_fcc_read_ui_2(context, id, &ui2);
862 kret = krb5_fcc_read_int32(context, id, &int32);
879 kret = krb5_fcc_read(context, id, a->contents, a->length);
906 krb5_fcc_write(krb5_context context, krb5_ccache id, krb5_pointer buf, unsigned int len)
915 return krb5_fcc_interpret(context, errno);
938 krb5_fcc_store_principal(krb5_context context, krb5_ccache id, krb5_principal princ)
946 type = krb5_princ_type(context, princ);
947 tmp = length = krb5_princ_size(context, princ);
957 ret = krb5_fcc_store_int32(context, id, type);
961 ret = krb5_fcc_store_int32(context, id, tmp);
964 ret = krb5_fcc_store_data(context, id, krb5_princ_realm(context, princ));
968 ret = krb5_fcc_store_data(context, id, krb5_princ_component(context, princ, i));
976 krb5_fcc_store_addrs(krb5_context context, krb5_ccache id, krb5_address **addrs)
991 ret = krb5_fcc_store_int32(context, id, length);
994 ret = krb5_fcc_store_addr(context, id, addrs[i]);
1002 krb5_fcc_store_keyblock(krb5_context context, krb5_ccache id, krb5_keyblock *keyblock)
1009 ret = krb5_fcc_store_ui_2(context, id, keyblock->enctype);
1012 ret = krb5_fcc_store_ui_2(context, id, keyblock->enctype);
1015 ret = krb5_fcc_store_ui_4(context, id, keyblock->length);
1017 return krb5_fcc_write(context, id, (char *) keyblock->contents, keyblock->length);
1021 krb5_fcc_store_addr(krb5_context context, krb5_ccache id, krb5_address *addr)
1027 ret = krb5_fcc_store_ui_2(context, id, addr->addrtype);
1029 ret = krb5_fcc_store_ui_4(context, id, addr->length);
1031 return krb5_fcc_write(context, id, (char *) addr->contents, addr->length);
1036 krb5_fcc_store_data(krb5_context context, krb5_ccache id, krb5_data *data)
1042 ret = krb5_fcc_store_ui_4(context, id, data->length);
1044 return krb5_fcc_write(context, id, data->data, data->length);
1048 krb5_fcc_store_int32(krb5_context context, krb5_ccache id, krb5_int32 i)
1057 return krb5_fcc_write(context, id, (char *) &i, sizeof(krb5_int32));
1066 return krb5_fcc_write(context, id, buf, 4);
1071 krb5_fcc_store_ui_4(krb5_context context, krb5_ccache id, krb5_ui_4 i)
1080 return krb5_fcc_write(context, id, (char *) &i, sizeof(krb5_int32));
1089 return krb5_fcc_write(context, id, buf, 4);
1094 krb5_fcc_store_ui_2(krb5_context context, krb5_ccache id, krb5_int32 i)
1105 return krb5_fcc_write(context, id, (char *) &ibuf, sizeof(krb5_ui_2));
1110 return krb5_fcc_write(context, id, buf, 2);
1115 krb5_fcc_store_octet(krb5_context context, krb5_ccache id, krb5_int32 i)
1122 return krb5_fcc_write(context, id, (char *) &ibuf, 1);
1126 krb5_fcc_store_times(krb5_context context, krb5_ccache id, krb5_ticket_times *t)
1135 return krb5_fcc_write(context, id, (char *) t, sizeof(krb5_ticket_times));
1137 retval = krb5_fcc_store_int32(context, id, t->authtime);
1139 retval = krb5_fcc_store_int32(context, id, t->starttime);
1141 retval = krb5_fcc_store_int32(context, id, t->endtime);
1143 retval = krb5_fcc_store_int32(context, id, t->renew_till);
1150 krb5_fcc_store_authdata(krb5_context context, krb5_ccache id, krb5_authdata **a)
1163 ret = krb5_fcc_store_int32(context, id, length);
1166 ret = krb5_fcc_store_authdatum (context, id, a[i]);
1173 krb5_fcc_store_authdatum (krb5_context context, krb5_ccache id, krb5_authdata *a)
1179 ret = krb5_fcc_store_ui_2(context, id, a->ad_type);
1181 ret = krb5_fcc_store_ui_4(context, id, a->length);
1183 return krb5_fcc_write(context, id, (krb5_pointer) a->contents, a->length);
1188 krb5_fcc_close_file (krb5_context context, krb5_fcc_data *data)
1198 retval = krb5_unlock_file(context, data->file);
1204 return ret ? krb5_fcc_interpret (context, errno) : 0;
1348 krb5_fcc_open_file (krb5_context context, krb5_ccache id, int mode)
1350 krb5_os_context os_ctx = (krb5_os_context)context->os_context;
1367 (void) krb5_unlock_file(context, data->file);
1407 return krb5_fcc_interpret (context, errno);
1415 if ((retval = krb5_lock_file(context, f, lock_flag))) {
1437 return (krb5_fcc_interpret(context, errno));
1441 fcc_fvno = htons(context->fcc_default_format);
1442 data->version = context->fcc_default_format;
1445 retval = ((cnt == -1) ? krb5_fcc_interpret(context, errno) :
1459 retval = krb5_fcc_store_ui_2(context, id, (krb5_int32)fcc_flen);
1467 retval = krb5_fcc_store_ui_2(context,id,(krb5_int32)fcc_tag);
1469 retval = krb5_fcc_store_ui_2(context,id,(krb5_int32)fcc_taglen);
1471 retval = krb5_fcc_store_int32(context,id,os_ctx->time_offset);
1473 retval = krb5_fcc_store_int32(context,id,os_ctx->usec_offset);
1501 if (krb5_fcc_read_ui_2(context, id, &fcc_flen) ||
1510 krb5_fcc_read_ui_2(context, id, &fcc_tag) ||
1511 krb5_fcc_read_ui_2(context, id, &fcc_taglen) ||
1524 if (!(context->library_options & KRB5_LIBOPT_SYNC_KDCTIME) ||
1527 if (krb5_fcc_read(context, id, buf, fcc_taglen)) {
1533 if (krb5_fcc_read_int32(context, id, &os_ctx->time_offset) ||
1534 krb5_fcc_read_int32(context, id, &os_ctx->usec_offset))
1544 if (fcc_taglen && krb5_fcc_read(context,id,buf,fcc_taglen)) {
1557 (void) krb5_unlock_file(context, f);
1564 krb5_fcc_skip_header(krb5_context context, krb5_ccache id)
1574 kret = krb5_fcc_read_ui_2(context, id, &fcc_flen);
1583 krb5_fcc_skip_principal(krb5_context context, krb5_ccache id)
1590 kret = krb5_fcc_read_principal(context, id, &princ);
1594 krb5_free_principal(context, princ);
1612 krb5_fcc_initialize(krb5_context context, krb5_ccache id, krb5_principal princ)
1621 MAYBE_OPEN(context, id, FCC_OPEN_AND_ERASE_NOUNLINK); /* Solaris Kerberos */
1639 kret = krb5_fcc_interpret(context, errno);
1640 MAYBE_CLOSE(context, id, kret);
1646 kret = krb5_fcc_store_principal(context, id, princ);
1648 MAYBE_CLOSE(context, id, kret);
1658 static krb5_error_code dereference(krb5_context context, krb5_fcc_data *data)
1684 krb5_fcc_close_file(context, data);
1703 krb5_fcc_close(krb5_context context, krb5_ccache id)
1705 dereference(context, (krb5_fcc_data *) id->data);
1718 krb5_fcc_destroy(krb5_context context, krb5_ccache id)
1738 kret = krb5_fcc_interpret(context, errno);
1755 kret = krb5_fcc_interpret(context, errno);
1765 kret = krb5_fcc_interpret(context, errno);
1779 kret = krb5_fcc_interpret(context, errno);
1787 kret = krb5_fcc_interpret(context, errno);
1798 kret = krb5_fcc_interpret(context, errno);
1811 kret = krb5_fcc_interpret(context, errno);
1821 kret = krb5_fcc_interpret(context, errno);
1833 kret = krb5_fcc_interpret(context, errno);
1839 dereference(context, data);
1868 krb5_fcc_resolve (krb5_context context, krb5_ccache *id, const char *residual)
1944 dereference(context, data);
1972 krb5_fcc_start_seq_get(krb5_context context, krb5_ccache id,
1989 kret = krb5_fcc_open_file(context, id, FCC_OPEN_RDONLY);
1998 kret = krb5_fcc_skip_header(context, id);
2004 kret = krb5_fcc_skip_principal(context, id);
2015 MAYBE_CLOSE(context, id, kret);
2042 krb5_fcc_next_cred(krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor,
2057 MAYBE_OPEN(context, id, FCC_OPEN_RDONLY);
2062 kret = krb5_fcc_interpret(context, errno);
2063 MAYBE_CLOSE(context, id, kret);
2068 kret = krb5_fcc_read_principal(context, id, &creds->client);
2070 kret = krb5_fcc_read_principal(context, id, &creds->server);
2072 kret = krb5_fcc_read_keyblock(context, id, &creds->keyblock);
2074 kret = krb5_fcc_read_times(context, id, &creds->times);
2076 kret = krb5_fcc_read_octet(context, id, &octet);
2079 kret = krb5_fcc_read_int32(context, id, &int32);
2082 kret = krb5_fcc_read_addrs(context, id, &creds->addresses);
2084 kret = krb5_fcc_read_authdata(context, id, &creds->authdata);
2086 kret = krb5_fcc_read_data(context, id, &creds->ticket);
2088 kret = krb5_fcc_read_data(context, id, &creds->second_ticket);
2095 MAYBE_CLOSE (context, id, kret);
2098 krb5_free_cred_contents(context, creds);
2116 krb5_fcc_end_seq_get(krb5_context context, krb5_ccache id, krb5_cc_cursor *cursor)
2124 MAYBE_CLOSE(context, id, kret); */
2145 krb5_fcc_generate_new (krb5_context context, krb5_ccache *id)
2153 krb5_int16 fcc_fvno = htons(context->fcc_default_format);
2169 return krb5_fcc_interpret(context, errno);
2176 return krb5_fcc_interpret(context, errno);
2242 kret = (cnt == -1) ? krb5_fcc_interpret(context, errsave) : KRB5_CC_IO;
2246 if (context->fcc_default_format == KRB5_FCC_FVNO_4) {
2252 kret = (cnt == -1) ? krb5_fcc_interpret(context, errsave) : KRB5_CC_IO;
2259 kret = krb5_fcc_interpret(context, errsave);
2284 dereference(context, data);
2318 krb5_fcc_get_name (krb5_context context, krb5_ccache id)
2337 krb5_fcc_get_principal(krb5_context context, krb5_ccache id, krb5_principal *princ)
2345 MAYBE_OPEN(context, id, FCC_OPEN_RDONLY);
2348 kret = krb5_fcc_skip_header(context, id);
2350 kret = krb5_fcc_read_principal(context, id, princ);
2353 MAYBE_CLOSE(context, id, kret);
2360 krb5_fcc_retrieve(krb5_context context, krb5_ccache id, krb5_flags whichfields, krb5_creds *mcreds, krb5_creds *creds)
2362 return krb5_cc_retrieve_cred_default (context, id, whichfields,
2379 krb5_fcc_store(krb5_context context, krb5_ccache id, krb5_creds *creds)
2389 MAYBE_OPEN(context, id, FCC_OPEN_RDWR);
2394 MAYBE_CLOSE_IGNORE(context, id);
2396 return krb5_fcc_interpret(context, errno);
2399 ret = krb5_fcc_store_principal(context, id, creds->client);
2401 ret = krb5_fcc_store_principal(context, id, creds->server);
2403 ret = krb5_fcc_store_keyblock(context, id, &creds->keyblock);
2405 ret = krb5_fcc_store_times(context, id, &creds->times);
2407 ret = krb5_fcc_store_octet(context, id, (krb5_int32) creds->is_skey);
2409 ret = krb5_fcc_store_int32(context, id, creds->ticket_flags);
2411 ret = krb5_fcc_store_addrs(context, id, creds->addresses);
2413 ret = krb5_fcc_store_authdata(context, id, creds->authdata);
2415 ret = krb5_fcc_store_data(context, id, &creds->ticket);
2417 ret = krb5_fcc_store_data(context, id, &creds->second_ticket);
2421 MAYBE_CLOSE(context, id, ret);
2435 krb5_fcc_remove_cred(krb5_context context, krb5_ccache cache, krb5_flags flags,
2453 krb5_fcc_set_flags(krb5_context context, krb5_ccache id, krb5_flags flags)
2467 (void) krb5_fcc_close_file (context, ((krb5_fcc_data *) id->data));
2471 MAYBE_OPEN(context, id, FCC_OPEN_RDONLY);
2491 krb5_fcc_get_flags(krb5_context context, krb5_ccache id, krb5_flags *flags)
2505 krb5_fcc_interpret(krb5_context context, int errnum)
2550 krb5_set_error_message(context, retval,