If there is a target principal, use the realm of the realm to change

the password with,


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16384 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-12-12 12:48:57 +00:00
parent ade9fa8270
commit b15b04eadd

View File

@@ -522,7 +522,12 @@ change_password_loop (krb5_context context,
int sock;
int i;
int done = 0;
krb5_realm realm = creds->client->realm;
krb5_realm realm;
if (targprinc)
realm = targprinc->realm;
else
realm = creds->client->realm;
ret = krb5_auth_con_init (context, &auth_context);
if (ret)
@@ -712,7 +717,7 @@ krb5_set_password(krb5_context context,
for (i = 0; procs[i].name != NULL; i++) {
*result_code = 0;
ret = change_password_loop(context, creds, targprinc, newpw,
ret = change_password_loop(context, creds, principal, newpw,
result_code, result_code_string,
result_string,
&procs[i]);