Fix include paths to new location of libutil.
[kai/samba-autobuild/.git] / source4 / kdc / kpasswdd.c
index 1d49a8a4bd23d726fe56754cd6fd6cd3fbfe63b1..d662844c4eb287f3cbe4b87e70cce0b0f71b72e7 100644 (file)
 #include "smbd/service_task.h"
 #include "lib/events/events.h"
 #include "lib/socket/socket.h"
-#include "kdc/kdc.h"
 #include "system/network.h"
-#include "lib/util/dlinklist.h"
+#include "../lib/util/dlinklist.h"
 #include "lib/ldb/include/ldb.h"
-#include "heimdal/lib/krb5/krb5_locl.h"
-#include "heimdal/lib/krb5/krb5-private.h"
 #include "auth/gensec/gensec.h"
 #include "auth/credentials/credentials.h"
 #include "auth/credentials/credentials_krb5.h"
 #include "rpc_server/samr/proto.h"
 #include "libcli/security/security.h"
 #include "param/param.h"
+#include "kdc/kdc.h"
+
+/* TODO: remove all SAMBA4_INTERNAL_HEIMDAL stuff from this file */
+#ifdef SAMBA4_INTERNAL_HEIMDAL
+#include "heimdal_build/kpasswdd-glue.h"
+#endif
 
 /* hold information about one kdc socket */
 struct kpasswd_socket {
@@ -283,6 +286,7 @@ 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) {
@@ -293,6 +297,12 @@ static bool kpasswd_process_request(struct kdc_server *kdc,
                                                                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,