libreplace: include <krb5.h> and <com_err.h> and no heimdal specific headers
authorStefan Metzmacher <metze@samba.org>
Fri, 1 Aug 2008 17:30:16 +0000 (19:30 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 1 Aug 2008 19:10:40 +0000 (21:10 +0200)
metze

source/kdc/kpasswdd.c
source/lib/replace/system/kerberos.h

index 55dadd9a7ea757fa57ec0d70d32520b9fd7cd859..065777fc6658de89984fb42af6c544c5216a51eb 100644 (file)
 #include "param/param.h"
 #include "kdc/kdc.h"
 
-/* TODO: remove this */
-#include "heimdal/lib/krb5/krb5_locl.h"
+/* TODO: remove all SAMBA4_INTERNAL_HEIMDAL stuff from this file */
+#ifdef SAMBA4_INTERNAL_HEIMDAL
+#include "heimdal/lib/hcrypto/aes.h"
 #include "heimdal/lib/krb5/krb5-private.h"
+#endif
 
 /* hold information about one kdc socket */
 struct kpasswd_socket {
@@ -285,6 +287,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) {
@@ -295,6 +298,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, 
index 78aa7b943f979e13cb2ce3e4d1c1763c6c70149c..2981024bee5ee9e7b29cd20c7ee7eab875b67ba9 100644 (file)
 /* Whether krb5_princ_realm returns krb5_realm or krb5_data */
 #define KRB5_PRINC_REALM_RETURNS_REALM 1
 
-#include "heimdal/lib/krb5/krb5.h"
-#include "heimdal/lib/com_err/com_err.h"
+#include <krb5.h>
+#include <com_err.h>
+
 #endif
 
 #endif