use private version of principalname
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14423 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -137,9 +137,9 @@ _krb5_extract_ticket(krb5_context context,
|
|||||||
time_t tmp_time;
|
time_t tmp_time;
|
||||||
krb5_timestamp sec_now;
|
krb5_timestamp sec_now;
|
||||||
|
|
||||||
ret = principalname2krb5_principal (&tmp_principal,
|
ret = _krb5_principalname2krb5_principal (&tmp_principal,
|
||||||
rep->kdc_rep.cname,
|
rep->kdc_rep.cname,
|
||||||
rep->kdc_rep.crealm);
|
rep->kdc_rep.crealm);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@@ -170,9 +170,9 @@ _krb5_extract_ticket(krb5_context context,
|
|||||||
|
|
||||||
/* compare server */
|
/* compare server */
|
||||||
|
|
||||||
ret = principalname2krb5_principal (&tmp_principal,
|
ret = _krb5_principalname2krb5_principal (&tmp_principal,
|
||||||
rep->kdc_rep.ticket.sname,
|
rep->kdc_rep.ticket.sname,
|
||||||
rep->kdc_rep.ticket.realm);
|
rep->kdc_rep.ticket.realm);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
if(allow_server_mismatch){
|
if(allow_server_mismatch){
|
||||||
@@ -440,10 +440,10 @@ init_as_req (krb5_context context,
|
|||||||
krb5_set_error_string(context, "malloc: out of memory");
|
krb5_set_error_string(context, "malloc: out of memory");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
ret = krb5_principal2principalname (a->req_body.cname, creds->client);
|
ret = _krb5_principal2principalname (a->req_body.cname, creds->client);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
ret = krb5_principal2principalname (a->req_body.sname, creds->server);
|
ret = _krb5_principal2principalname (a->req_body.sname, creds->server);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
ret = copy_Realm(&creds->client->realm, &a->req_body.realm);
|
ret = copy_Realm(&creds->client->realm, &a->req_body.realm);
|
||||||
|
@@ -545,7 +545,7 @@ init_creds_init_as_req (krb5_context context,
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if (creds->client) {
|
if (creds->client) {
|
||||||
ret = krb5_principal2principalname (a->req_body.cname, creds->client);
|
ret = _krb5_principal2principalname (a->req_body.cname, creds->client);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
ret = copy_Realm(&creds->client->realm, &a->req_body.realm);
|
ret = copy_Realm(&creds->client->realm, &a->req_body.realm);
|
||||||
@@ -561,7 +561,7 @@ init_creds_init_as_req (krb5_context context,
|
|||||||
ret = copy_Realm(&realm, &a->req_body.realm);
|
ret = copy_Realm(&realm, &a->req_body.realm);
|
||||||
free(realm);
|
free(realm);
|
||||||
}
|
}
|
||||||
ret = krb5_principal2principalname (a->req_body.sname, creds->server);
|
ret = _krb5_principal2principalname (a->req_body.sname, creds->server);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
@@ -234,9 +234,9 @@ krb5_rd_cred(krb5_context context,
|
|||||||
krb5_abortx(context, "internal error in ASN.1 encoder");
|
krb5_abortx(context, "internal error in ASN.1 encoder");
|
||||||
copy_EncryptionKey (&kci->key, &creds->session);
|
copy_EncryptionKey (&kci->key, &creds->session);
|
||||||
if (kci->prealm && kci->pname)
|
if (kci->prealm && kci->pname)
|
||||||
principalname2krb5_principal (&creds->client,
|
_krb5_principalname2krb5_principal (&creds->client,
|
||||||
*kci->pname,
|
*kci->pname,
|
||||||
*kci->prealm);
|
*kci->prealm);
|
||||||
if (kci->flags)
|
if (kci->flags)
|
||||||
creds->flags.b = *kci->flags;
|
creds->flags.b = *kci->flags;
|
||||||
if (kci->authtime)
|
if (kci->authtime)
|
||||||
@@ -248,9 +248,9 @@ krb5_rd_cred(krb5_context context,
|
|||||||
if (kci->renew_till)
|
if (kci->renew_till)
|
||||||
creds->times.renew_till = *kci->renew_till;
|
creds->times.renew_till = *kci->renew_till;
|
||||||
if (kci->srealm && kci->sname)
|
if (kci->srealm && kci->sname)
|
||||||
principalname2krb5_principal (&creds->server,
|
_krb5_principalname2krb5_principal (&creds->server,
|
||||||
*kci->sname,
|
*kci->sname,
|
||||||
*kci->srealm);
|
*kci->srealm);
|
||||||
if (kci->caddr)
|
if (kci->caddr)
|
||||||
krb5_copy_addresses (context,
|
krb5_copy_addresses (context,
|
||||||
kci->caddr,
|
kci->caddr,
|
||||||
|
@@ -312,10 +312,10 @@ krb5_verify_ap_req2(krb5_context context,
|
|||||||
if(ret)
|
if(ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
principalname2krb5_principal(&t->server, ap_req->ticket.sname,
|
_krb5_principalname2krb5_principal(&t->server, ap_req->ticket.sname,
|
||||||
ap_req->ticket.realm);
|
ap_req->ticket.realm);
|
||||||
principalname2krb5_principal(&t->client, t->ticket.cname,
|
_krb5_principalname2krb5_principal(&t->client, t->ticket.cname,
|
||||||
t->ticket.crealm);
|
t->ticket.crealm);
|
||||||
|
|
||||||
/* save key */
|
/* save key */
|
||||||
|
|
||||||
@@ -333,12 +333,12 @@ krb5_verify_ap_req2(krb5_context context,
|
|||||||
krb5_principal p1, p2;
|
krb5_principal p1, p2;
|
||||||
krb5_boolean res;
|
krb5_boolean res;
|
||||||
|
|
||||||
principalname2krb5_principal(&p1,
|
_krb5_principalname2krb5_principal(&p1,
|
||||||
ac->authenticator->cname,
|
ac->authenticator->cname,
|
||||||
ac->authenticator->crealm);
|
ac->authenticator->crealm);
|
||||||
principalname2krb5_principal(&p2,
|
_krb5_principalname2krb5_principal(&p2,
|
||||||
t->ticket.cname,
|
t->ticket.cname,
|
||||||
t->ticket.crealm);
|
t->ticket.crealm);
|
||||||
res = krb5_principal_compare (context, p1, p2);
|
res = krb5_principal_compare (context, p1, p2);
|
||||||
krb5_free_principal (context, p1);
|
krb5_free_principal (context, p1);
|
||||||
krb5_free_principal (context, p2);
|
krb5_free_principal (context, p2);
|
||||||
@@ -501,9 +501,9 @@ krb5_rd_req(krb5_context context,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if(server == NULL){
|
if(server == NULL){
|
||||||
principalname2krb5_principal(&service,
|
_krb5_principalname2krb5_principal(&service,
|
||||||
ap_req.ticket.sname,
|
ap_req.ticket.sname,
|
||||||
ap_req.ticket.realm);
|
ap_req.ticket.realm);
|
||||||
server = service;
|
server = service;
|
||||||
}
|
}
|
||||||
if (ap_req.ap_options.use_session_key &&
|
if (ap_req.ap_options.use_session_key &&
|
||||||
|
Reference in New Issue
Block a user