summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-11-07 00:48:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:25:00 -0500
commit13dbee3ffea6065a826f010e50c9b4eb2c6ad109 (patch)
treeeede29a3bff4c6de3432c16f5555dc9640267327 /source4/auth
parentc755bb5025ee60ae41de9cc32d3fa54e3671941d (diff)
downloadsamba-13dbee3ffea6065a826f010e50c9b4eb2c6ad109.tar.gz
samba-13dbee3ffea6065a826f010e50c9b4eb2c6ad109.tar.bz2
samba-13dbee3ffea6065a826f010e50c9b4eb2c6ad109.zip
r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world. Add credentials_krb5.h with the kerberos dependent prototypes. Andrew Bartlett (This used to be commit 2b569c42e0fbb596ea82484d0e1cb22e193037b9)
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/auth.h5
-rw-r--r--source4/auth/auth_developer.c1
-rw-r--r--source4/auth/auth_sam.c2
-rw-r--r--source4/auth/auth_sam_reply.c1
-rw-r--r--source4/auth/auth_util.c2
-rw-r--r--source4/auth/config.mk2
-rw-r--r--source4/auth/credentials/config.mk14
-rw-r--r--source4/auth/credentials/credentials.c3
-rw-r--r--source4/auth/credentials/credentials_files.c1
-rw-r--r--source4/auth/credentials/credentials_krb5.c8
-rw-r--r--source4/auth/credentials/credentials_krb5.h34
-rw-r--r--source4/auth/credentials/credentials_ntlm.c1
-rw-r--r--source4/auth/gensec/config.mk9
-rw-r--r--source4/auth/gensec/cyrus_sasl.c2
-rw-r--r--source4/auth/gensec/gensec.c2
-rw-r--r--source4/auth/gensec/gensec.h3
-rw-r--r--source4/auth/gensec/gensec_krb5.c3
-rw-r--r--source4/auth/gensec/schannel.c2
-rw-r--r--source4/auth/gensec/schannel.h2
-rw-r--r--source4/auth/gensec/schannel_sign.c2
-rw-r--r--source4/auth/gensec/schannel_state.c3
-rw-r--r--source4/auth/gensec/spnego.c6
-rw-r--r--source4/auth/gensec/spnego.h5
-rw-r--r--source4/auth/gensec/spnego_parse.c3
-rw-r--r--source4/auth/kerberos/config.mk2
-rw-r--r--source4/auth/kerberos/kerberos.h12
-rw-r--r--source4/auth/kerberos/kerberos_pac.c2
-rw-r--r--source4/auth/kerberos/kerberos_util.c1
-rw-r--r--source4/auth/kerberos/kerberos_verify.c6
-rw-r--r--source4/auth/ntlmssp/ntlmssp.c4
-rw-r--r--source4/auth/ntlmssp/ntlmssp_client.c3
-rw-r--r--source4/auth/ntlmssp/ntlmssp_server.c4
-rw-r--r--source4/auth/ntlmssp/ntlmssp_sign.c2
-rw-r--r--source4/auth/sam.c1
34 files changed, 108 insertions, 45 deletions
diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index badfe14762..4c172af1fe 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -22,10 +22,7 @@
#ifndef _SAMBA_AUTH_H
#define _SAMBA_AUTH_H
-#include "libcli/auth/credentials.h"
-#include "auth/gensec/gensec.h"
-#include "auth/gensec/spnego.h"
-#include "lib/ldb/include/ldb.h"
+union netr_Validation;
/* modules can use the following to determine if the interface has changed
* please increment the version number after each interface change
diff --git a/source4/auth/auth_developer.c b/source4/auth/auth_developer.c
index 76044d4361..f3a984ce30 100644
--- a/source4/auth/auth_developer.c
+++ b/source4/auth/auth_developer.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "auth/auth.h"
#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_samr.h"
static NTSTATUS name_to_ntstatus_want_check(struct auth_method_context *ctx,
TALLOC_CTX *mem_ctx,
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index 3d28b88446..8bfcab1eaf 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -21,8 +21,10 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
#include "system/time.h"
#include "db_wrap.h"
+#include "lib/ldb/include/ldb.h"
#include "auth/auth.h"
#include "auth/auth_sam.h"
#include "dsdb/samdb/samdb.h"
diff --git a/source4/auth/auth_sam_reply.c b/source4/auth/auth_sam_reply.c
index 0ea501d585..b6e740a128 100644
--- a/source4/auth/auth_sam_reply.c
+++ b/source4/auth/auth_sam_reply.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "auth/auth.h"
#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
NTSTATUS auth_convert_server_info_sambaseinfo(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
diff --git a/source4/auth/auth_util.c b/source4/auth/auth_util.c
index 7d24028083..a3f51846b6 100644
--- a/source4/auth/auth_util.c
+++ b/source4/auth/auth_util.c
@@ -27,6 +27,8 @@
#include "libcli/security/security.h"
#include "libcli/auth/libcli_auth.h"
#include "dsdb/samdb/samdb.h"
+#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
/* this default function can be used by mostly all backends
* which don't want to set a challenge
diff --git a/source4/auth/config.mk b/source4/auth/config.mk
index 968072b918..b34dbac21e 100644
--- a/source4/auth/config.mk
+++ b/source4/auth/config.mk
@@ -74,6 +74,6 @@ OBJ_FILES = \
auth.o \
auth_util.o \
auth_simple.o
-PUBLIC_DEPENDENCIES = LIBSECURITY process_model SAMDB
+PUBLIC_DEPENDENCIES = LIBSECURITY process_model SAMDB CREDENTIALS
# End SUBSYSTEM auth
#######################
diff --git a/source4/auth/credentials/config.mk b/source4/auth/credentials/config.mk
index aa1fdf896d..5bf7aa891f 100644
--- a/source4/auth/credentials/config.mk
+++ b/source4/auth/credentials/config.mk
@@ -5,10 +5,20 @@ PUBLIC_PROTO_HEADER = credentials_proto.h
PUBLIC_HEADERS = credentials.h
OBJ_FILES = credentials.o \
credentials_files.o \
- credentials_krb5.o \
credentials_ntlm.o
PUBLIC_DEPENDENCIES = \
- LIBCLI_AUTH SECRETS LIBCRYPTO HEIMDAL_GSSAPI
+ LIBCLI_AUTH SECRETS LIBCRYPTO
+PRIVATE_DEPENDENCIES = CREDENTIALS_KRB5
# End SUBSYSTEM CREDENTIALS
#################################
+#################################
+# Start SUBSYSTEM CREDENTIALS
+[SUBSYSTEM::CREDENTIALS_KRB5]
+PUBLIC_PROTO_HEADER = credentials_krb5_proto.h
+PUBLIC_HEADERS = credentials_krb5.h
+OBJ_FILES = credentials_krb5.o
+PUBLIC_DEPENDENCIES = \
+ HEIMDAL_GSSAPI
+# End SUBSYSTEM CREDENTIALS
+#################################
diff --git a/source4/auth/credentials/credentials.c b/source4/auth/credentials/credentials.c
index caaef3e0c2..d4db0a0180 100644
--- a/source4/auth/credentials/credentials.c
+++ b/source4/auth/credentials/credentials.c
@@ -24,7 +24,8 @@
#include "includes.h"
#include "librpc/gen_ndr/samr.h" /* for struct samrPassword */
-#include "auth/gensec/gensec.h"
+#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
#include "libcli/auth/libcli_auth.h"
/**
diff --git a/source4/auth/credentials/credentials_files.c b/source4/auth/credentials/credentials_files.c
index 53a6f39cd4..ecd89d2259 100644
--- a/source4/auth/credentials/credentials_files.c
+++ b/source4/auth/credentials/credentials_files.c
@@ -29,6 +29,7 @@
#include "system/filesys.h"
#include "db_wrap.h"
#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
/**
* Read a file descriptor, and parse it for a password (eg from a file or stdin)
diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c
index 7d53caddfa..f0305fd360 100644
--- a/source4/auth/credentials/credentials_krb5.c
+++ b/source4/auth/credentials/credentials_krb5.c
@@ -25,6 +25,8 @@
#include "includes.h"
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
+#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
int cli_credentials_get_krb5_context(struct cli_credentials *cred,
struct smb_krb5_context **smb_krb5_context)
@@ -333,9 +335,9 @@ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
to the credentials system.
*/
- int cli_credentials_set_client_gss_creds(struct cli_credentials *cred,
- gss_cred_id_t gssapi_cred,
- enum credentials_obtained obtained)
+int cli_credentials_set_client_gss_creds(struct cli_credentials *cred,
+ gss_cred_id_t gssapi_cred,
+ enum credentials_obtained obtained)
{
int ret;
OM_uint32 maj_stat, min_stat;
diff --git a/source4/auth/credentials/credentials_krb5.h b/source4/auth/credentials/credentials_krb5.h
new file mode 100644
index 0000000000..2bd38af5c7
--- /dev/null
+++ b/source4/auth/credentials/credentials_krb5.h
@@ -0,0 +1,34 @@
+/*
+ samba -- Unix SMB/CIFS implementation.
+
+ Client credentials structure
+
+ Copyright (C) Jelmer Vernooij 2004-2006
+ Copyright (C) Andrew Bartlett <abartlet@samba.org> 2005
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+struct EncryptionKey;
+
+#include "heimdal/lib/gssapi/gssapi.h"
+
+struct ccache_container;
+
+struct gssapi_creds_container {
+ gss_cred_id_t creds;
+};
+
+#include "auth/credentials/credentials_krb5_proto.h"
diff --git a/source4/auth/credentials/credentials_ntlm.c b/source4/auth/credentials/credentials_ntlm.c
index 23838da888..5317032683 100644
--- a/source4/auth/credentials/credentials_ntlm.c
+++ b/source4/auth/credentials/credentials_ntlm.c
@@ -26,6 +26,7 @@
#include "librpc/gen_ndr/samr.h" /* for struct samrPassword */
#include "lib/crypto/crypto.h"
#include "libcli/auth/libcli_auth.h"
+#include "auth/credentials/credentials.h"
void cli_credentials_get_ntlm_username_domain(struct cli_credentials *cred, TALLOC_CTX *mem_ctx,
const char **username,
diff --git a/source4/auth/gensec/config.mk b/source4/auth/gensec/config.mk
index 84947785db..a395dd205f 100644
--- a/source4/auth/gensec/config.mk
+++ b/source4/auth/gensec/config.mk
@@ -18,7 +18,7 @@ PUBLIC_DEPENDENCIES = \
SUBSYSTEM = gensec
INIT_FUNCTION = gensec_krb5_init
OBJ_FILES = gensec_krb5.o
-PUBLIC_DEPENDENCIES = KERBEROS auth auth_sam
+PUBLIC_DEPENDENCIES = CREDENTIALS_KRB5 KERBEROS auth auth_sam
# End MODULE gensec_krb5
################################################
@@ -28,7 +28,7 @@ PUBLIC_DEPENDENCIES = KERBEROS auth auth_sam
SUBSYSTEM = gensec
INIT_FUNCTION = gensec_gssapi_init
OBJ_FILES = gensec_gssapi.o
-PUBLIC_DEPENDENCIES = KERBEROS auth HEIMDAL_GSSAPI
+PUBLIC_DEPENDENCIES = CREDENTIALS_KRB5 KERBEROS auth HEIMDAL_GSSAPI
# End MODULE gensec_gssapi
################################################
@@ -38,7 +38,7 @@ PUBLIC_DEPENDENCIES = KERBEROS auth HEIMDAL_GSSAPI
SUBSYSTEM = gensec
INIT_FUNCTION = gensec_sasl_init
OBJ_FILES = cyrus_sasl.o
-PUBLIC_DEPENDENCIES = SASL auth
+PUBLIC_DEPENDENCIES = CREDENTIALS SASL auth
# End MODULE cyrus_sasl
################################################
@@ -49,6 +49,7 @@ SUBSYSTEM = gensec
INIT_FUNCTION = gensec_spnego_init
PRIVATE_PROTO_HEADER = spnego_proto.h
PRIVATE_DEPENDENCIES = ASN1_UTIL GENSEC_SOCKET
+PUBLIC_DEPENDENCIES = CREDENTIALS
OBJ_FILES = spnego.o \
spnego_parse.o
# End MODULE gensec_spnego
@@ -62,7 +63,7 @@ PRIVATE_PROTO_HEADER = schannel_proto.h
INIT_FUNCTION = gensec_schannel_init
OBJ_FILES = schannel.o \
schannel_sign.o
-PUBLIC_DEPENDENCIES = auth SCHANNELDB NDR_SCHANNEL
+PUBLIC_DEPENDENCIES = auth SCHANNELDB NDR_SCHANNEL CREDENTIALS
OUTPUT_TYPE = INTEGRATED
# End MODULE gensec_schannel
################################################
diff --git a/source4/auth/gensec/cyrus_sasl.c b/source4/auth/gensec/cyrus_sasl.c
index 17a0162e8d..c0dd314d3d 100644
--- a/source4/auth/gensec/cyrus_sasl.c
+++ b/source4/auth/gensec/cyrus_sasl.c
@@ -22,6 +22,8 @@
#include "includes.h"
#include "auth/auth.h"
+#include "auth/credentials/credentials.h"
+#include "auth/gensec/gensec.h"
#include "lib/socket/socket.h"
#include <sasl/sasl.h>
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 619cf7c350..8c97a871ad 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -26,6 +26,8 @@
#include "lib/events/events.h"
#include "build.h"
#include "librpc/rpc/dcerpc.h"
+#include "auth/credentials/credentials.h"
+#include "auth/gensec/gensec.h"
/* the list of currently registered GENSEC backends */
static struct gensec_security_ops **generic_security_ops;
diff --git a/source4/auth/gensec/gensec.h b/source4/auth/gensec/gensec.h
index 97d9577d83..c70424800c 100644
--- a/source4/auth/gensec/gensec.h
+++ b/source4/auth/gensec/gensec.h
@@ -42,6 +42,8 @@ enum gensec_priority {
GENSEC_OTHER = 0
};
+enum credentials_use_kerberos;
+
struct gensec_security;
struct gensec_target {
const char *principal;
@@ -167,7 +169,6 @@ struct gensec_critical_sizes {
int sizeof_gensec_security;
};
-#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec_proto.h"
#endif /* __GENSEC_H__ */
diff --git a/source4/auth/gensec/gensec_krb5.c b/source4/auth/gensec/gensec_krb5.c
index 3695454c76..d84f3dedf5 100644
--- a/source4/auth/gensec/gensec_krb5.c
+++ b/source4/auth/gensec/gensec_krb5.c
@@ -34,6 +34,9 @@
#include "system/network.h"
#include "lib/socket/socket.h"
#include "librpc/rpc/dcerpc.h"
+#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
+#include "auth/gensec/gensec.h"
enum GENSEC_KRB5_STATE {
GENSEC_KRB5_SERVER_START,
diff --git a/source4/auth/gensec/schannel.c b/source4/auth/gensec/schannel.c
index 9bcb307548..18c6222e13 100644
--- a/source4/auth/gensec/schannel.c
+++ b/source4/auth/gensec/schannel.c
@@ -24,6 +24,8 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_schannel.h"
#include "auth/auth.h"
+#include "auth/credentials/credentials.h"
+#include "auth/gensec/gensec.h"
#include "auth/gensec/schannel.h"
#include "auth/gensec/schannel_state.h"
#include "auth/gensec/schannel_proto.h"
diff --git a/source4/auth/gensec/schannel.h b/source4/auth/gensec/schannel.h
index c109387c7c..4a05f8ab1a 100644
--- a/source4/auth/gensec/schannel.h
+++ b/source4/auth/gensec/schannel.h
@@ -21,6 +21,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "libcli/auth/credentials.h"
+
enum schannel_position {
SCHANNEL_STATE_START = 0,
SCHANNEL_STATE_UPDATE_1
diff --git a/source4/auth/gensec/schannel_sign.c b/source4/auth/gensec/schannel_sign.c
index b4549ddefd..ad424f0299 100644
--- a/source4/auth/gensec/schannel_sign.c
+++ b/source4/auth/gensec/schannel_sign.c
@@ -25,6 +25,8 @@
#include "lib/crypto/crypto.h"
#include "auth/auth.h"
#include "auth/gensec/schannel.h"
+#include "auth/credentials/credentials.h"
+#include "auth/gensec/gensec.h"
#define NETSEC_SIGN_SIGNATURE { 0x77, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
#define NETSEC_SEAL_SIGNATURE { 0x77, 0x00, 0x7a, 0x00, 0xff, 0xff, 0x00, 0x00 }
diff --git a/source4/auth/gensec/schannel_state.c b/source4/auth/gensec/schannel_state.c
index e9c81f370c..3c9ff64147 100644
--- a/source4/auth/gensec/schannel_state.c
+++ b/source4/auth/gensec/schannel_state.c
@@ -21,11 +21,12 @@
*/
#include "includes.h"
-#include "auth/auth.h"
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "dsdb/samdb/samdb.h"
#include "db_wrap.h"
+#include "libcli/auth/libcli_auth.h"
+#include "auth/auth.h"
/**
connect to the schannel ldb
diff --git a/source4/auth/gensec/spnego.c b/source4/auth/gensec/spnego.c
index f989455a72..c647ba5333 100644
--- a/source4/auth/gensec/spnego.c
+++ b/source4/auth/gensec/spnego.c
@@ -23,10 +23,10 @@
*/
#include "includes.h"
-#include "auth/auth.h"
-#include "auth/gensec/spnego_proto.h"
+#include "auth/gensec/spnego.h"
#include "librpc/gen_ndr/ndr_dcerpc.h"
-#include "lib/socket/socket.h"
+#include "auth/credentials/credentials.h"
+#include "auth/gensec/gensec.h"
#include "auth/gensec/socket.h"
enum spnego_state_position {
diff --git a/source4/auth/gensec/spnego.h b/source4/auth/gensec/spnego.h
index 1064370146..78afbe0107 100644
--- a/source4/auth/gensec/spnego.h
+++ b/source4/auth/gensec/spnego.h
@@ -21,9 +21,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifndef SAMBA_SPNEGO_H
-#define SAMBA_SPNEGO_H
-
#define SPNEGO_DELEG_FLAG 0x01
#define SPNEGO_MUTUAL_FLAG 0x02
#define SPNEGO_REPLAY_FLAG 0x04
@@ -66,4 +63,4 @@ enum spnego_message_type {
SPNEGO_NEG_TOKEN_TARG = 1,
};
-#endif
+#include "auth/gensec/spnego_proto.h"
diff --git a/source4/auth/gensec/spnego_parse.c b/source4/auth/gensec/spnego_parse.c
index 8dde78da48..66e24bdbe5 100644
--- a/source4/auth/gensec/spnego_parse.c
+++ b/source4/auth/gensec/spnego_parse.c
@@ -22,7 +22,8 @@
*/
#include "includes.h"
-#include "auth/auth.h"
+#include "auth/gensec/spnego.h"
+#include "auth/gensec/gensec.h"
#include "libcli/util/asn_1.h"
static BOOL read_negTokenInit(struct asn1_data *asn1, struct spnego_negTokenInit *token)
diff --git a/source4/auth/kerberos/config.mk b/source4/auth/kerberos/config.mk
index f65ebec63a..689130d567 100644
--- a/source4/auth/kerberos/config.mk
+++ b/source4/auth/kerberos/config.mk
@@ -10,6 +10,6 @@ OBJ_FILES = kerberos.o \
gssapi_parse.o \
krb5_init_context.o
PUBLIC_DEPENDENCIES = HEIMDAL_KRB5 NDR_KRB5PAC samba-socket LIBCLI_RESOLVE
-PRIVATE_DEPENDENCIES = ASN1_UTIL HEIMDAL_ROKEN_ADDRINFO auth_sam
+PRIVATE_DEPENDENCIES = ASN1_UTIL HEIMDAL_ROKEN_ADDRINFO auth_sam CREDENTIALS_KRB5
# End SUBSYSTEM KERBEROS
#################################
diff --git a/source4/auth/kerberos/kerberos.h b/source4/auth/kerberos/kerberos.h
index 3e724c29a5..b82dd3f75a 100644
--- a/source4/auth/kerberos/kerberos.h
+++ b/source4/auth/kerberos/kerberos.h
@@ -21,23 +21,17 @@
#if defined(HAVE_KRB5)
-#include "auth/credentials/credentials.h"
#include "auth/kerberos/krb5_init_context.h"
#include "librpc/gen_ndr/krb5pac.h"
struct auth_serversupplied_info;
+struct cli_credentials;
struct ccache_container {
struct smb_krb5_context *smb_krb5_context;
krb5_ccache ccache;
};
-
-struct gssapi_creds_container {
- gss_cred_id_t creds;
-};
-
-
struct keytab_container {
struct smb_krb5_context *smb_krb5_context;
krb5_keytab keytab;
@@ -159,10 +153,6 @@ NTSTATUS kerberos_decode_pac(TALLOC_CTX *mem_ctx,
time_t tgs_authtime,
DATA_BLOB *pac);
- int cli_credentials_set_client_gss_creds(struct cli_credentials *cred,
- gss_cred_id_t gssapi_cred,
- enum credentials_obtained obtained);
-
#include "auth/kerberos/proto.h"
#endif /* HAVE_KRB5 */
diff --git a/source4/auth/kerberos/kerberos_pac.c b/source4/auth/kerberos/kerberos_pac.c
index 0be0ebaad7..dcfe16c896 100644
--- a/source4/auth/kerberos/kerberos_pac.c
+++ b/source4/auth/kerberos/kerberos_pac.c
@@ -28,7 +28,7 @@
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
#include "librpc/gen_ndr/ndr_krb5pac.h"
-#include "auth/auth.h"
+#include "lib/ldb/include/ldb.h"
#include "auth/auth_sam.h"
static krb5_error_code check_pac_checksum(TALLOC_CTX *mem_ctx,
diff --git a/source4/auth/kerberos/kerberos_util.c b/source4/auth/kerberos/kerberos_util.c
index 02d5cf8a99..66002e2f71 100644
--- a/source4/auth/kerberos/kerberos_util.c
+++ b/source4/auth/kerberos/kerberos_util.c
@@ -25,6 +25,7 @@
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
struct principal_container {
struct smb_krb5_context *smb_krb5_context;
diff --git a/source4/auth/kerberos/kerberos_verify.c b/source4/auth/kerberos/kerberos_verify.c
index 29d704b148..2111e22aa3 100644
--- a/source4/auth/kerberos/kerberos_verify.c
+++ b/source4/auth/kerberos/kerberos_verify.c
@@ -26,8 +26,8 @@
#include "includes.h"
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
-
-#ifdef HAVE_KRB5
+#include "auth/credentials/credentials.h"
+#include "auth/credentials/credentials_krb5.h"
/**********************************************************************************
Verify an incoming ticket and parse out the principal name and
@@ -100,5 +100,3 @@
return NT_STATUS_OK;
}
-
-#endif /* HAVE_KRB5 */
diff --git a/source4/auth/ntlmssp/ntlmssp.c b/source4/auth/ntlmssp/ntlmssp.c
index 806532911a..6fbbd7d638 100644
--- a/source4/auth/ntlmssp/ntlmssp.c
+++ b/source4/auth/ntlmssp/ntlmssp.c
@@ -23,10 +23,12 @@
*/
#include "includes.h"
-#include "auth/auth.h"
#include "auth/ntlmssp/ntlmssp.h"
#include "auth/ntlmssp/msrpc_parse.h"
#include "librpc/gen_ndr/ndr_dcerpc.h"
+#include "auth/credentials/credentials.h"
+#include "auth/gensec/gensec.h"
+#include "auth/auth.h"
/**
* Callbacks for NTLMSSP - for both client and server operating modes
diff --git a/source4/auth/ntlmssp/ntlmssp_client.c b/source4/auth/ntlmssp/ntlmssp_client.c
index 1244c0dfbc..23d96fb90b 100644
--- a/source4/auth/ntlmssp/ntlmssp_client.c
+++ b/source4/auth/ntlmssp/ntlmssp_client.c
@@ -23,11 +23,12 @@
*/
#include "includes.h"
-#include "auth/auth.h"
#include "auth/ntlmssp/ntlmssp.h"
#include "auth/ntlmssp/msrpc_parse.h"
#include "lib/crypto/crypto.h"
#include "libcli/auth/libcli_auth.h"
+#include "auth/credentials/credentials.h"
+#include "auth/gensec/gensec.h"
/*********************************************************************
Client side NTLMSSP
diff --git a/source4/auth/ntlmssp/ntlmssp_server.c b/source4/auth/ntlmssp/ntlmssp_server.c
index eab5838113..31c2ac63f4 100644
--- a/source4/auth/ntlmssp/ntlmssp_server.c
+++ b/source4/auth/ntlmssp/ntlmssp_server.c
@@ -23,13 +23,15 @@
*/
#include "includes.h"
-#include "auth/auth.h"
#include "auth/ntlmssp/ntlmssp.h"
#include "auth/ntlmssp/msrpc_parse.h"
#include "lib/crypto/crypto.h"
#include "pstring.h"
#include "system/filesys.h"
#include "libcli/auth/libcli_auth.h"
+#include "auth/credentials/credentials.h"
+#include "auth/gensec/gensec.h"
+#include "auth/auth.h"
/**
* Set a username on an NTLMSSP context - ensures it is talloc()ed
diff --git a/source4/auth/ntlmssp/ntlmssp_sign.c b/source4/auth/ntlmssp/ntlmssp_sign.c
index 90550f3a14..316bb257ff 100644
--- a/source4/auth/ntlmssp/ntlmssp_sign.c
+++ b/source4/auth/ntlmssp/ntlmssp_sign.c
@@ -25,6 +25,8 @@
#include "auth/ntlmssp/ntlmssp.h"
#include "auth/ntlmssp/msrpc_parse.h"
#include "lib/crypto/crypto.h"
+#include "auth/credentials/credentials.h"
+#include "auth/gensec/gensec.h"
#define CLI_SIGN "session key to client-to-server signing key magic constant"
#define CLI_SEAL "session key to client-to-server sealing key magic constant"
diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index 0284cb9a19..c7f0a74ac9 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -27,6 +27,7 @@
#include "dsdb/samdb/samdb.h"
#include "libcli/security/security.h"
#include "libcli/ldap/ldap.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
const char *user_attrs[] = {
/* required for the krb5 kdc */