summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRambaldi <gentoo@xs4me.net>2012-07-07 13:37:45 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-07-09 08:41:19 -0400
commitbb446567389e894bf4d64a9589606d1951ac7902 (patch)
treeb8e8ef3d6ebd653b18ab1d76f5862e0b40dbe971 /src
parent5dc9860a9f0aa626687281eed62c8af1986c2b99 (diff)
downloadsssd-bb446567389e894bf4d64a9589606d1951ac7902.tar.gz
sssd-bb446567389e894bf4d64a9589606d1951ac7902.tar.bz2
sssd-bb446567389e894bf4d64a9589606d1951ac7902.zip
heimdal: use sss_krb5_princ_realm to access realm
Diffstat (limited to 'src')
-rw-r--r--src/providers/krb5/krb5_child.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
index 86050d16..f647bf79 100644
--- a/src/providers/krb5/krb5_child.c
+++ b/src/providers/krb5/krb5_child.c
@@ -839,6 +839,9 @@ static krb5_error_code get_and_save_tgt(struct krb5_req *kr,
{
krb5_error_code kerr = 0;
int ret;
+ const char *realm_name;
+ int realm_length;
+
kerr = sss_krb5_get_init_creds_opt_set_expire_callback(kr->ctx, kr->options,
sss_krb5_expire_callback_func,
@@ -848,9 +851,10 @@ static krb5_error_code get_and_save_tgt(struct krb5_req *kr,
DEBUG(1, ("Failed to set expire callback, continue without.\n"));
}
+ sss_krb5_princ_realm(kr->ctx, kr->princ, &realm_name, &realm_length);
+
DEBUG(SSSDBG_TRACE_FUNC,
- ("Attempting kinit for realm [%s]\n",
- kr->princ->realm.data));
+ ("Attempting kinit for realm [%s]\n",realm_name));
kerr = krb5_get_init_creds_password(kr->ctx, kr->creds, kr->princ,
password, sss_krb5_prompter, kr, 0,
NULL, kr->options);
@@ -919,6 +923,8 @@ static errno_t changepw_child(int fd, struct krb5_req *kr)
uint8_t *user_resp;
char *changepw_princ = NULL;
krb5_prompter_fct prompter = sss_krb5_prompter;
+ const char *realm_name;
+ int realm_length;
DEBUG(SSSDBG_TRACE_LIBS, ("Password change operation\n"));
@@ -951,9 +957,10 @@ static errno_t changepw_child(int fd, struct krb5_req *kr)
prompter = NULL;
}
+ sss_krb5_princ_realm(kr->ctx, kr->princ, &realm_name, &realm_length);
+
DEBUG(SSSDBG_TRACE_FUNC,
- ("Attempting kinit for realm [%s]\n",
- kr->princ->realm.data));
+ ("Attempting kinit for realm [%s]\n",realm_name));
kerr = krb5_get_init_creds_password(kr->ctx, kr->creds, kr->princ,
pass_str, prompter, kr, 0,
changepw_princ,