diff --git a/samba/auth/auth_util.c b/samba/auth/auth_util.c
index b1e1672..7068cdf 100644
--- a/samba/auth/auth_util.c
+++ b/samba/auth/auth_util.c
@@ -23,7 +23,7 @@
 */
 
 #include "includes.h"
-#include <heimdal/gssapi/gssapi.h>
+#include <gssapi/gssapi.h>
 #include "auth/auth.h"
 #include "libcli/security/security.h"
 #include "libcli/auth/libcli_auth.h"
diff --git a/samba/auth/credentials/credentials_krb5.h b/samba/auth/credentials/credentials_krb5.h
index a7a05d2..4a23954 100644
--- a/samba/auth/credentials/credentials_krb5.h
+++ b/samba/auth/credentials/credentials_krb5.h
@@ -21,7 +21,7 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include <heimdal/gssapi/gssapi.h>
+#include <gssapi/gssapi.h>
 
 struct ccache_container;
 
diff --git a/samba/lib/replace/system/kerberos.h b/samba/lib/replace/system/kerberos.h
index 496eec9..88d1d99 100644
--- a/samba/lib/replace/system/kerberos.h
+++ b/samba/lib/replace/system/kerberos.h
@@ -125,7 +125,7 @@
 /* Whether krb5_princ_realm returns krb5_realm or krb5_data */
 #define KRB5_PRINC_REALM_RETURNS_REALM 1
 
-#include <heimdal/krb5.h>
+#include <krb5.h>
 #include <com_err.h>
 #endif
 
diff --git a/samba/auth/kerberos/krb5_init_context.h b/samba/auth/kerberos/krb5_init_context.h
index 4b7cc3a..d318149 100644
--- a/samba/auth/kerberos/krb5_init_context.h
+++ b/samba/auth/kerberos/krb5_init_context.h
@@ -17,7 +17,7 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
-#include <heimdal/krb5.h>
+#include <krb5.h>
 
 struct smb_krb5_context {
 	struct krb5_context_data *krb5_context;

diff --git a/samba/include/config.h b/samba/include/config.h
index a555fbb..b99c4d5 100644
--- a/samba/include/config.h
+++ b/samba/include/config.h
@@ -454,7 +454,7 @@
 /* #undef HAVE_NSS_COMMON_H */
 
 /* Define to 1 if you have the <nss.h> header file. */
-#define HAVE_NSS_H 1
+#define HAVE_NSS_H 0
 
 /* Define to 1 if you have the <ns_api.h> header file. */
 /* #undef HAVE_NS_API_H */
diff --git a/samba/auth/gensec/gensec_gssapi.c b/samba/auth/gensec/gensec_gssapi.c
index 5f92e78..daecb7a 100644
--- a/samba/auth/gensec/gensec_gssapi.c
+++ b/samba/auth/gensec/gensec_gssapi.c
@@ -23,7 +23,7 @@
 */
 
 #include "includes.h"
-#include <heimdal/gssapi/gssapi_krb5.h>
+#include <gssapi/gssapi_krb5.h>
 #include "system/kerberos.h"
 #include <heimdal/gssapi/gssapi.h>
 #include "auth/kerberos/kerberos.h"
diff --git a/samba/auth/gensec/gensec_gssapi.c b/samba/auth/gensec/gensec_gssapi.c
index daecb7a..0139f8d 100644
--- a/samba/auth/gensec/gensec_gssapi.c
+++ b/samba/auth/gensec/gensec_gssapi.c
@@ -25,7 +25,7 @@
 #include "includes.h"
 #include <gssapi/gssapi_krb5.h>
 #include "system/kerberos.h"
-#include <heimdal/gssapi/gssapi.h>
+#include <gssapi/gssapi.h>
 #include "auth/kerberos/kerberos.h"
 #include "librpc/gen_ndr/krb5pac.h"
 #include "auth/auth.h"
diff --git a/samba/auth/kerberos/kerberos.c b/samba/auth/kerberos/kerberos.c
index 1f190c1..37a9773 100644
--- a/samba/auth/kerberos/kerberos.c
+++ b/samba/auth/kerberos/kerberos.c
@@ -24,7 +24,7 @@
 
 #include "includes.h"
 #include "system/kerberos.h"
-#include <heimdal/roken.h>
+#include <roken.h>
 
 #ifdef HAVE_KRB5
 
diff --git a/samba/auth/kerberos/krb5_init_context.c b/samba/auth/kerberos/krb5_init_context.c
index f7230e4..20d65c6 100644
--- a/samba/auth/kerberos/krb5_init_context.c
+++ b/samba/auth/kerberos/krb5_init_context.c
@@ -27,9 +27,9 @@
 #include "lib/socket/socket.h"
 #include "system/network.h"
 #include "lib/events/events.h"
-#include <heimdal/roken.h>
+#include <roken.h>
 
-#include <heimdal/krb5.h>
+#include <krb5.h>
 
 /*
   context structure for operations on cldap packets
diff --git a/samba/dsdb/samdb/ldb_modules/password_hash.c b/samba/dsdb/samdb/ldb_modules/password_hash.c
index 26101b9..3467d8e 100644
--- a/samba/dsdb/samdb/ldb_modules/password_hash.c
+++ b/samba/dsdb/samdb/ldb_modules/password_hash.c
@@ -43,7 +43,7 @@
 #include "system/time.h"
 #include "dsdb/samdb/samdb.h"
 #include "dsdb/common/flags.h"
-#include <heimdal/hdb.h>
+#include <hdb.h>
 #include "dsdb/samdb/ldb_modules/password_modules.h"
 
 /* If we have decided there is reason to work on this request, then
 
