/titanic_41/usr/src/cmd/ssh/libssh/common/ |
H A D | radix.c | 40 creds_to_radix(CREDENTIALS *creds, u_char *buf, size_t buflen) in creds_to_radix() argument 49 buffer_append(&b, creds->service, strlen(creds->service)); in creds_to_radix() 51 buffer_append(&b, creds->instance, strlen(creds->instance)); in creds_to_radix() 53 buffer_append(&b, creds->realm, strlen(creds->realm)); in creds_to_radix() 55 buffer_append(&b, creds->pname, strlen(creds->pname)); in creds_to_radix() 57 buffer_append(&b, creds->pinst, strlen(creds->pinst)); in creds_to_radix() 63 buffer_put_int(&b, creds->issue_date); in creds_to_radix() 64 buffer_put_int(&b, krb_life_to_time(creds->issue_date, in creds_to_radix() 65 creds->lifetime)); in creds_to_radix() 66 buffer_append(&b, creds->session, sizeof(creds->session)); in creds_to_radix() [all …]
|
/titanic_41/usr/src/cmd/ssh/sshd/ |
H A D | auth-krb4.c | 285 CREDENTIALS creds; in auth_krb4_tgt() local 293 if (!radix_to_creds(string, &creds)) { in auth_krb4_tgt() 297 if (strncmp(creds.service, "", 1) == 0) /* backward compatibility */ in auth_krb4_tgt() 298 strlcpy(creds.service, "krbtgt", sizeof creds.service); in auth_krb4_tgt() 300 if (strcmp(creds.service, "krbtgt")) { in auth_krb4_tgt() 302 creds.pname, creds.pinst[0] ? "." : "", creds.pinst, in auth_krb4_tgt() 303 creds.realm, pw->pw_name); in auth_krb4_tgt() 309 if (in_tkt(creds.pname, creds.pinst) != KSUCCESS) in auth_krb4_tgt() 312 if (save_credentials(creds.service, creds.instance, creds.realm, in auth_krb4_tgt() 313 creds.session, creds.lifetime, creds.kvno, &creds.ticket_st, in auth_krb4_tgt() [all …]
|
/titanic_41/usr/src/lib/gss_mechs/mech_krb5/krb5/ccache/ |
H A D | cc_retr.c | 60 standard_fields_match(krb5_context context, const krb5_creds *mcreds, const krb5_creds *creds) in standard_fields_match() argument 62 return (krb5_principal_compare(context, mcreds->client,creds->client) in standard_fields_match() 63 && krb5_principal_compare(context, mcreds->server,creds->server)); in standard_fields_match() 69 srvname_match(krb5_context context, const krb5_creds *mcreds, const krb5_creds *creds) in srvname_match() argument 74 retval = krb5_principal_compare(context, mcreds->client,creds->client); in srvname_match() 81 p2 = *creds->server; in srvname_match() 169 …_match_request(krb5_context context, krb5_flags whichfields, krb5_creds *mcreds, krb5_creds *creds) in krb5int_cc_creds_match_request() argument 172 srvname_match(context, mcreds, creds)) || in krb5int_cc_creds_match_request() 173 standard_fields_match(context, mcreds, creds)) in krb5int_cc_creds_match_request() 176 mcreds->is_skey == creds->is_skey) in krb5int_cc_creds_match_request() [all …]
|
H A D | cc_memory.c | 63 krb5_creds *creds ); 73 krb5_creds *creds ); 79 (krb5_context, krb5_ccache id , krb5_creds *creds ); 104 krb5_creds *creds; member 176 krb5_free_creds(context, curr->creds); in krb5_mcc_free() 337 krb5_cc_cursor *cursor, krb5_creds *creds) in krb5_mcc_next_cred() argument 349 memset(creds, 0, sizeof(krb5_creds)); in krb5_mcc_next_cred() 350 if (mcursor->creds) { in krb5_mcc_next_cred() 351 *creds = *mcursor->creds; in krb5_mcc_next_cred() 352 retval = krb5_copy_principal(context, mcursor->creds->client, &creds->client); in krb5_mcc_next_cred() [all …]
|
H A D | ccfns.c | 66 krb5_creds *creds) in krb5_cc_store_cred() argument 72 ret = cache->ops->store(context, cache, creds); in krb5_cc_store_cred() 79 s1 = creds->server; in krb5_cc_store_cred() 80 ret = decode_krb5_ticket(&creds->ticket, &tkt); in krb5_cc_store_cred() 85 creds->server = s2; in krb5_cc_store_cred() 86 ret = cache->ops->store(context, cache, creds); in krb5_cc_store_cred() 87 creds->server = s1; in krb5_cc_store_cred() 96 krb5_creds *creds) in krb5_cc_retrieve_cred() argument 101 ret = cache->ops->retrieve(context, cache, flags, mcreds, creds); in krb5_cc_retrieve_cred() 112 ret = cache->ops->retrieve(context, cache, flags, mcreds, creds); in krb5_cc_retrieve_cred() [all …]
|
H A D | cccopy.c | 11 krb5_creds creds; in krb5_cc_copy_creds() local 27 while (!(code = krb5_cc_next_cred(context, incc, &cur, &creds))) { in krb5_cc_copy_creds() 28 code = krb5_cc_store_cred(context, outcc, &creds); in krb5_cc_copy_creds() 29 krb5_free_cred_contents(context, &creds); in krb5_cc_copy_creds()
|
/titanic_41/usr/src/lib/gss_mechs/mech_krb5/krb5/krb/ |
H A D | gic_keytab.c | 92 krb5_creds *creds, in krb5_get_init_creds_keytab() argument 153 ret = krb5_get_init_creds(context, creds, client, NULL, NULL, in krb5_get_init_creds_keytab() 174 ret2 = krb5_get_init_creds(context, creds, client, NULL, NULL, in krb5_get_init_creds_keytab() 211 krb5_creds *creds, krb5_kdc_rep **ret_as_reply) in krb5_get_in_tkt_with_keytab() argument 222 pre_auth_types, creds); in krb5_get_in_tkt_with_keytab() 233 retval = krb5_unparse_name( context, creds->server, &server); in krb5_get_in_tkt_with_keytab() 236 server_princ = creds->server; in krb5_get_in_tkt_with_keytab() 237 client_princ = creds->client; in krb5_get_in_tkt_with_keytab() 239 creds, creds->client, in krb5_get_in_tkt_with_keytab() 249 if (creds->server) in krb5_get_in_tkt_with_keytab() [all …]
|
H A D | fwd_tgt.c | 55 krb5_creds creds, tgt; in krb5_fwd_tgt_creds() local 64 memset((char *)&creds, 0, sizeof(creds)); in krb5_fwd_tgt_creds() 65 memset((char *)&tgt, 0, sizeof(creds)); in krb5_fwd_tgt_creds() 102 if ((retval = krb5_copy_principal(context, client, &creds.client))) in krb5_fwd_tgt_creds() 105 if ((retval = krb5_build_principal_ext(context, &creds.server, in krb5_fwd_tgt_creds() 118 &creds, &tgt); in krb5_fwd_tgt_creds() 124 if (!krb5_principal_compare(context, tgt.client, creds.client)) { in krb5_fwd_tgt_creds() 130 r_err = krb5_unparse_name(context, creds.client, &r_name); in krb5_fwd_tgt_creds() 177 creds.keyblock.enctype = enctype; in krb5_fwd_tgt_creds() 178 creds.times = tgt.times; in krb5_fwd_tgt_creds() [all …]
|
H A D | vfy_increds.c | 18 krb5_creds creds; in krb5_cc_copy_creds_except() local 33 while ((code = krb5_cc_next_cred(context, incc, &cur, &creds)) == NULL) { in krb5_cc_copy_creds_except() 34 if (krb5_principal_compare(context, princ, creds.server)) in krb5_cc_copy_creds_except() 37 code = krb5_cc_store_cred(context, outcc, &creds); in krb5_cc_copy_creds_except() 38 krb5_free_cred_contents(context, &creds); in krb5_cc_copy_creds_except() 68 krb5_creds *creds, in krb5_verify_init_creds() argument 134 (void) krb5_libdefault_boolean(context, &creds->client->realm, in krb5_verify_init_creds() 150 if (krb5_principal_compare(context, server, creds->server)) { in krb5_verify_init_creds() 152 if ((ret = krb5_mk_req_extended(context, &authcon, 0, NULL, creds, in krb5_verify_init_creds() 168 if ((ret = krb5_cc_initialize(context, ccache, creds->client)) != NULL) in krb5_verify_init_creds() [all …]
|
H A D | gic_pwd.c | 124 krb5_creds *creds, in krb5_get_init_creds_password() argument 142 return (__krb5_get_init_creds_password(context, creds, client, password, in krb5_get_init_creds_password() 154 krb5_creds *creds, in __krb5_get_init_creds_password() argument 209 ret = krb5_get_init_creds(context, creds, client, prompter, data, in __krb5_get_init_creds_password() 240 ret2 = krb5_get_init_creds(context, creds, client, prompter, data, in __krb5_get_init_creds_password() 411 ret = krb5_get_init_creds(context, creds, client, prompter, data, in __krb5_get_init_creds_password() 518 krb5_preauthtype *pre_auth_types, krb5_creds *creds) in krb5int_populate_gic_opt() argument 544 if (creds && creds->times.endtime) { in krb5int_populate_gic_opt() 546 if (creds->times.starttime) starttime = creds->times.starttime; in krb5int_populate_gic_opt() 547 krb5_get_init_creds_opt_set_tkt_life(opt, creds->times.endtime - starttime); in krb5int_populate_gic_opt() [all …]
|
H A D | mk_req.c | 66 krb5_creds creds; in krb5_mk_req() local 74 memset((char *)&creds, 0, sizeof(creds)); in krb5_mk_req() 75 if ((retval = krb5_copy_principal(context, server, &creds.server))) in krb5_mk_req() 79 if ((retval = krb5_cc_get_principal(context, ccache, &creds.client)) != 0) in krb5_mk_req() 84 ccache, &creds, &credsp)) != 0) in krb5_mk_req() 93 krb5_free_cred_contents(context, &creds); in krb5_mk_req()
|
H A D | get_in_tkt.c | 383 krb5_creds * creds, in stash_as_reply() argument 394 if (!creds->client) in stash_as_reply() 398 if (!creds->server) in stash_as_reply() 406 &creds->keyblock))) in stash_as_reply() 409 creds->times = as_reply->enc_part2->times; in stash_as_reply() 410 creds->is_skey = FALSE; /* this is an AS_REQ, so cannot in stash_as_reply() 412 creds->ticket_flags = as_reply->enc_part2->flags; in stash_as_reply() 414 &creds->addresses))) in stash_as_reply() 417 creds->second_ticket.length = 0; in stash_as_reply() 418 creds->second_ticket.data = 0; in stash_as_reply() [all …]
|
H A D | sendauth.c | 50 krb5_creds creds; in krb5_sendauth() local 96 memset((char *)&creds, 0, sizeof(creds)); in krb5_sendauth() 110 &creds.server))) in krb5_sendauth() 114 &creds.client); in krb5_sendauth() 117 &creds.client); in krb5_sendauth() 119 krb5_free_principal(context, creds.server); in krb5_sendauth() 127 in_creds = &creds; in krb5_sendauth() 239 krb5_free_cred_contents(context, &creds); in krb5_sendauth()
|
/titanic_41/usr/src/cmd/ssh/ssh/ |
H A D | sshconnect1.c | 641 krb5_creds creds; in send_krb5_tgt() local 649 memset(&creds, 0, sizeof(creds)); in send_krb5_tgt() 668 problem = krb5_cc_get_principal(context, ccache, &creds.client); in send_krb5_tgt() 675 problem = krb5_build_principal(context, &creds.server, in send_krb5_tgt() 676 strlen(creds.client->realm), creds.client->realm, in send_krb5_tgt() 677 "krbtgt", creds.client->realm, NULL); in send_krb5_tgt() 679 problem = krb5_build_principal(context, &creds.server, in send_krb5_tgt() 680 creds.client->realm.length, creds.client->realm.data, in send_krb5_tgt() 686 creds.times.endtime = 0; in send_krb5_tgt() 694 ccache, flags.i, remotehost, &creds, &outbuf); in send_krb5_tgt() [all …]
|
/titanic_41/usr/src/lib/gss_mechs/mech_krb5/krb5/os/ |
H A D | changepw.c | 193 krb5_change_set_password(krb5_context context, krb5_creds *creds, char *newpw, in krb5_change_set_password() argument 224 creds, in krb5_change_set_password() 231 creds->server), in krb5_change_set_password() 338 krb5_change_password(krb5_context context, krb5_creds *creds, char *newpw, int *result_code, krb5_d… in krb5_change_password() argument 341 context, creds, newpw, NULL, result_code, result_code_string, result_string ); in krb5_change_password() 352 krb5_creds *creds, in krb5_set_password() argument 359 context, creds, newpw, change_password_for, result_code, result_code_string, result_string ); in krb5_set_password() 371 krb5_creds creds; in krb5_set_password_using_ccache() local 378 memset (&creds, 0, sizeof(creds)); in krb5_set_password_using_ccache() 382 code = krb5_cc_get_principal (context, ccache, &creds.client); in krb5_set_password_using_ccache() [all …]
|
/titanic_41/usr/src/lib/krb5/kadm5/clnt/ |
H A D | client_init.c | 588 krb5_creds creds; in _kadm5_init_any() local 642 memset((char *) &creds, 0, sizeof(creds)); in _kadm5_init_any() 723 &creds.client))) { in _kadm5_init_any() 728 clientp = creds.client; in _kadm5_init_any() 759 &creds.server))) { in _kadm5_init_any() 773 (gss_name_t *)&creds.server); in _kadm5_init_any() 782 serverp = creds.server; in _kadm5_init_any() 824 creds.client))) in _kadm5_init_any() 840 creds.times.starttime = 0; /* start timer at KDC */ in _kadm5_init_any() 841 creds.times.endtime = 0; /* endtime will be limited by service */ in _kadm5_init_any() [all …]
|
/titanic_41/usr/src/cmd/cmd-inet/usr.bin/telnet/ |
H A D | kerberos5.c | 200 krb5_creds creds; /* telnet gets session key from here */ in kerberos5_send() local 225 (void) memset((char *)&creds, 0, sizeof (creds)); in kerberos5_send() 229 "host", KRB5_NT_SRV_HST, &creds.server))) { in kerberos5_send() 250 krb5_princ_set_realm(telnet_context, creds.server, &rdata); in kerberos5_send() 258 &creds.client)) != NULL) { in kerberos5_send() 264 krb5_free_cred_contents(telnet_context, &creds); in kerberos5_send() 273 if ((retval = krb5_get_tgs_ktypes(telnet_context, creds.server, in kerberos5_send() 282 krb5_free_cred_contents(telnet_context, &creds); in kerberos5_send() 300 krb5_free_cred_contents(telnet_context, &creds); in kerberos5_send() 304 creds.keyblock.enctype = ktypes[i]; in kerberos5_send() [all …]
|
/titanic_41/usr/src/lib/libgss/ |
H A D | g_acquire_cred_with_pw.c | 111 gss_union_cred_t creds; local 156 creds = (gss_union_cred_t)malloc(sizeof (gss_union_cred_desc)); 157 if (creds == NULL) 161 (void) memset(creds, 0, sizeof (gss_union_cred_desc)); 166 (gss_cred_id_t)creds, 196 if (creds->count < 1) { 197 free(creds); 206 if ((*actual_mechs = create_actual_mechs(creds->mechs_array, 207 creds->count)) == NULL) { 209 (gss_cred_id_t *)&creds); [all …]
|
H A D | g_acquire_cred.c | 154 gss_union_cred_t creds; local 193 creds = (gss_union_cred_t)malloc(sizeof (gss_union_cred_desc)); 194 if (creds == NULL) 198 (void) memset(creds, 0, sizeof (gss_union_cred_desc)); 202 major = gss_add_cred(minor_status, (gss_cred_id_t)creds, 231 if (creds->count < 1) { 232 free(creds); 241 if ((*actual_mechs = create_actual_mechs(creds->mechs_array, 242 creds->count)) == NULL) { 244 (gss_cred_id_t *)&creds); [all …]
|
/titanic_41/usr/src/uts/common/rpc/sec_gss/ |
H A D | svc_rpcsec_gss.c | 922 rpc_gss_creds creds, in rpcsec_gss_init() argument 930 if (creds.ctx_handle.length != 0) { in rpcsec_gss_init() 985 arg->cr_version = creds.version; in rpcsec_gss_init() 986 arg->cr_service = creds.service; in rpcsec_gss_init() 1020 rpc_gss_creds creds, in rpcsec_gss_continue_init() argument 1028 if (creds.ctx_handle.length == 0) { in rpcsec_gss_continue_init() 1033 if ((client_data = get_client(&creds.ctx_handle)) == NULL) { in rpcsec_gss_continue_init() 1052 return (rpcsec_gss_init(rqst, msg, creds, no_dispatch, in rpcsec_gss_continue_init() 1070 gss_parms->service = creds.service; in rpcsec_gss_continue_init() 1073 gss_parms->seq_num = creds.seq_num; in rpcsec_gss_continue_init() [all …]
|
H A D | rpcsec_gss_misc.c | 93 __xdr_rpc_gss_creds(xdrs, creds) in __xdr_rpc_gss_creds() argument 95 rpc_gss_creds *creds; 97 if (!xdr_u_int(xdrs, (uint_t *)&creds->version) || 98 !xdr_u_int(xdrs, (uint_t *)&creds->gss_proc) || 99 !xdr_u_int(xdrs, (uint_t *)&creds->seq_num) || 100 !xdr_u_int(xdrs, (uint_t *)&creds->service) || 101 !__xdr_gss_buf(xdrs, &creds->ctx_handle))
|
/titanic_41/usr/src/cmd/cmd-inet/common/ |
H A D | store_forw_creds.c | 45 krb5_creds **creds, in store_forw_creds() argument 80 if ((retval = krb5_cc_store_cred(context, *ccache, *creds)) != 0) { in store_forw_creds() 90 if ((retval = krb5_unparse_name(context, (*creds)->client, in store_forw_creds() 94 if (kwarn_add_warning(client_name, (*creds)->times.endtime) != 0) { in store_forw_creds()
|
/titanic_41/usr/src/lib/rpcsec_gss/ |
H A D | svc_rpcsec_gss.c | 573 rpc_gss_creds creds; local 608 memset((char *)&creds, 0, sizeof (creds)); 609 if (!__xdr_rpc_gss_creds(&xdrs, &creds)) { 621 if (creds.gss_proc == RPCSEC_GSS_INIT) { 622 if (creds.ctx_handle.length != 0) { 640 if (creds.gss_proc != RPCSEC_GSS_CONTINUE_INIT) { 641 switch (creds.service) { 651 if (creds.ctx_handle.length == 0) { 655 if ((client_data = get_client(&creds.ctx_handle)) == NULL) { 694 gss_parms->service = creds.service; [all …]
|
H A D | rpcsec_gss_misc.c | 75 __xdr_rpc_gss_creds(xdrs, creds) in __xdr_rpc_gss_creds() argument 77 rpc_gss_creds *creds; 79 if (!xdr_u_int(xdrs, &creds->version) || 80 !xdr_u_int(xdrs, &creds->gss_proc) || 81 !xdr_u_int(xdrs, &creds->seq_num) || 82 !xdr_u_int(xdrs, (u_int *)&creds->service) || 83 !__xdr_gss_buf(xdrs, &creds->ctx_handle))
|
/titanic_41/usr/src/cmd/cmd-inet/usr.sbin/kssl/kssladm/ |
H A D | ksslutil.c | 107 KMF_CREDENTIAL creds; in PEM_get_rsa_key_certs() local 124 creds.cred = password_buf; in PEM_get_rsa_key_certs() 125 creds.credlen = strlen(password_buf); in PEM_get_rsa_key_certs() 127 rv = kmf_import_objects(kmfh, (char *)filename, &creds, &tcerts, in PEM_get_rsa_key_certs()
|