From: Günther Deschner Date: Thu, 24 Feb 2011 11:27:29 +0000 (+0100) Subject: s3-build: only include asn1 headers where actually needed. X-Git-Tag: ldb-1.1.0~728 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=3aa9d3005ac2e48cf789e147a098e8feecdd41ef s3-build: only include asn1 headers where actually needed. Guenther --- diff --git a/source3/include/includes.h b/source3/include/includes.h index c508266fc47..cda366f7c13 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -540,7 +540,6 @@ extern void *cmdline_lp_ctx; #include "../lib/util/data_blob.h" #include "../lib/util/time.h" -#include "../lib/util/asn1.h" #include "libads/ads_status.h" #include "trans2.h" diff --git a/source3/include/proto.h b/source3/include/proto.h index 7126103b963..f944b2a58d1 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -2298,6 +2298,10 @@ DATA_BLOB spnego_gen_negTokenInit(TALLOC_CTX *ctx, const char *OIDs[], DATA_BLOB *psecblob, const char *principal); + +#ifndef ASN1_MAX_OIDS +#define ASN1_MAX_OIDS 20 +#endif bool spnego_parse_negTokenInit(TALLOC_CTX *ctx, DATA_BLOB blob, char *OIDs[ASN1_MAX_OIDS], diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c index 9523fdeab9f..db5d562effe 100644 --- a/source3/lib/tldap.c +++ b/source3/lib/tldap.c @@ -19,6 +19,7 @@ #include "includes.h" #include "tldap.h" +#include "../lib/util/asn1.h" static int tldap_simple_recv(struct tevent_req *req); diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c index 52bacfd8436..7697a4326ab 100644 --- a/source3/lib/tldap_util.c +++ b/source3/lib/tldap_util.c @@ -21,6 +21,7 @@ #include "tldap.h" #include "tldap_util.h" #include "../libcli/security/security.h" +#include "../lib/util/asn1.h" bool tldap_entry_values(struct tldap_message *msg, const char *attribute, DATA_BLOB **values, int *num_values) diff --git a/source3/libads/krb5_setpw.c b/source3/libads/krb5_setpw.c index c919a257a48..d84dd5dff93 100644 --- a/source3/libads/krb5_setpw.c +++ b/source3/libads/krb5_setpw.c @@ -21,6 +21,7 @@ #include "includes.h" #include "smb_krb5.h" #include "libads/kerberos_proto.h" +#include "../lib/util/asn1.h" #ifdef HAVE_KRB5 diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index b4962a02032..016500418ed 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -23,6 +23,7 @@ #include "includes.h" #include "smb_krb5.h" #include "../librpc/gen_ndr/krb5pac.h" +#include "../lib/util/asn1.h" #ifndef KRB5_AUTHDATA_WIN2K_PAC #define KRB5_AUTHDATA_WIN2K_PAC 128 diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c index 382a29ac657..4581ce40267 100644 --- a/source3/libsmb/clispnego.c +++ b/source3/libsmb/clispnego.c @@ -23,6 +23,7 @@ #include "includes.h" #include "../libcli/auth/spnego.h" #include "smb_krb5.h" +#include "../lib/util/asn1.h" /* generate a negTokenInit packet given a list of supported diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c index 7fe44a0853d..78ec3b2e65c 100644 --- a/source3/smbd/seal.c +++ b/source3/smbd/seal.c @@ -23,6 +23,7 @@ #include "../libcli/auth/ntlmssp.h" #include "ntlmssp_wrap.h" #include "smb_crypt.h" +#include "../lib/util/asn1.h" /****************************************************************************** Server side encryption. diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 3cb07bea740..6c67f3ea40d 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -30,6 +30,7 @@ #include "librpc/gen_ndr/messaging.h" #include "../librpc/gen_ndr/krb5pac.h" #include "libads/kerberos_proto.h" +#include "../lib/util/asn1.h" /* For split krb5 SPNEGO blobs. */ struct pending_auth_data { diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index d1ebe9b673a..3b33af8fe29 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -27,6 +27,7 @@ #include "ntlmssp_wrap.h" #include "../librpc/gen_ndr/krb5pac.h" #include "libads/kerberos_proto.h" +#include "../lib/util/asn1.h" static NTSTATUS smbd_smb2_session_setup(struct smbd_smb2_request *smb2req, uint64_t in_session_id, diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 43af0fd638c..a6c5be84699 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -35,6 +35,7 @@ #include "libads/kerberos_proto.h" #include "nsswitch/winbind_client.h" #include "librpc/gen_ndr/krb5pac.h" +#include "../lib/util/asn1.h" #ifndef PAM_WINBIND_CONFIG_FILE #define PAM_WINBIND_CONFIG_FILE "/etc/security/pam_winbind.conf"