From 13dbee3ffea6065a826f010e50c9b4eb2c6ad109 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Nov 2006 00:48:36 +0000 Subject: 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) --- source4/auth/gensec/config.mk | 9 +++++---- source4/auth/gensec/cyrus_sasl.c | 2 ++ source4/auth/gensec/gensec.c | 2 ++ source4/auth/gensec/gensec.h | 3 ++- source4/auth/gensec/gensec_krb5.c | 3 +++ source4/auth/gensec/schannel.c | 2 ++ source4/auth/gensec/schannel.h | 2 ++ source4/auth/gensec/schannel_sign.c | 2 ++ source4/auth/gensec/schannel_state.c | 3 ++- source4/auth/gensec/spnego.c | 6 +++--- source4/auth/gensec/spnego.h | 5 +---- source4/auth/gensec/spnego_parse.c | 3 ++- 12 files changed, 28 insertions(+), 14 deletions(-) (limited to 'source4/auth/gensec') 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 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) -- cgit