summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-11-12 15:37:07 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-11-15 01:25:06 +0000
commitbbfaa9bbdfc7f3c360a2d79124122a360aa9f493 (patch)
treeb0d88978abba4b3113472a43c4e369d6e9e1fe7d
parent6a27fbbfc4c51ae1635b8a5fa51c470ebc9f01e2 (diff)
downloadsamba-bbfaa9bbdfc7f3c360a2d79124122a360aa9f493.tar.gz
samba-bbfaa9bbdfc7f3c360a2d79124122a360aa9f493.tar.bz2
samba-bbfaa9bbdfc7f3c360a2d79124122a360aa9f493.zip
s4-kdc Remove use of heimdal private headers in kpasswd server.
This remains an abuse, because it relies on setting into the krb5_principal structure, but at least it causes less trouble for the server. Andrew Bartlett
-rw-r--r--source4/kdc/kpasswdd.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c
index 88d86cd6e4..7d7e98bd96 100644
--- a/source4/kdc/kpasswdd.c
+++ b/source4/kdc/kpasswdd.c
@@ -40,11 +40,6 @@
#include "param/param.h"
#include "kdc/kdc-glue.h"
-/* TODO: remove all SAMBA4_INTERNAL_HEIMDAL stuff from this file */
-#ifdef SAMBA4_INTERNAL_HEIMDAL
-#include "heimdal_build/kpasswdd-glue.h"
-#endif
-
/* Return true if there is a valid error packet formed in the error_blob */
static bool kpasswdd_make_error_reply(struct kdc_server *kdc,
TALLOC_CTX *mem_ctx,
@@ -311,23 +306,15 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
reply);
}
if (chpw.targname && chpw.targrealm) {
-#ifdef SAMBA4_INTERNAL_HEIMDAL
- if (_krb5_principalname2krb5_principal(kdc->smb_krb5_context->krb5_context,
- &principal, *chpw.targname,
- *chpw.targrealm) != 0) {
+ krb5_build_principal_ext(kdc->smb_krb5_context->krb5_context,
+ &principal, strlen(*chpw.targrealm), *chpw.targrealm, 0);
+ if (copy_PrincipalName(chpw.targname, &principal->name)) {
free_ChangePasswdDataMS(&chpw);
return kpasswdd_make_error_reply(kdc, mem_ctx,
KRB5_KPASSWD_MALFORMED,
"failed to extract principal to set",
reply);
-
}
-#else /* SAMBA4_INTERNAL_HEIMDAL */
- return kpasswdd_make_error_reply(kdc, mem_ctx,
- KRB5_KPASSWD_BAD_VERSION,
- "Operation Not Implemented",
- reply);
-#endif /* SAMBA4_INTERNAL_HEIMDAL */
} else {
free_ChangePasswdDataMS(&chpw);
return kpasswdd_change_password(kdc, mem_ctx, session_info,