s3-build: only include smbldap.h where needed.
authorGünther Deschner <gd@samba.org>
Thu, 26 Aug 2010 12:07:20 +0000 (14:07 +0200)
committerGünther Deschner <gd@samba.org>
Mon, 20 Sep 2010 20:54:56 +0000 (13:54 -0700)
Guenther

source3/include/includes.h
source3/include/proto.h
source3/include/smbldap.h
source3/libads/ldap.c
source3/libnet/libnet_samsync_ldif.c
source3/param/loadparm.c
source3/utils/net_sam.c

index b185ce261d5252a4ddd20521e14026e2c77be362..7626a53abc2c4a4bbfd231f594fff2788566a4de 100644 (file)
@@ -658,10 +658,6 @@ extern void *cmdline_lp_ctx;
 #include "../lib/util/smb_threads.h"
 #include "../lib/util/smb_threads_internal.h"
 
-/* forward declarations from smbldap.c */
-
-#include "smbldap.h"
-
 /*
  * Reasons for cache flush.
  */
index c104f06032f1fe9f58d1ea2eb02d307ccaeb7892..9902198067d8aefbe8aed4a450df2147d165ead5 100644 (file)
@@ -740,43 +740,6 @@ bool share_access_check(const struct security_token *token, const char *sharenam
                        uint32 desired_access);
 bool parse_usershare_acl(TALLOC_CTX *ctx, const char *acl_str, struct security_descriptor **ppsd);
 
-/* The following definitions come from lib/smbldap.c  */
-
-int smb_ldap_start_tls(LDAP *ldap_struct, int version);
-int smb_ldap_setup_full_conn(LDAP **ldap_struct, const char *uri);
-int smbldap_search(struct smbldap_state *ldap_state, 
-                  const char *base, int scope, const char *filter, 
-                  const char *attrs[], int attrsonly, 
-                  LDAPMessage **res);
-int smbldap_search_paged(struct smbldap_state *ldap_state, 
-                        const char *base, int scope, const char *filter, 
-                        const char **attrs, int attrsonly, int pagesize,
-                        LDAPMessage **res, void **cookie);
-int smbldap_modify(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
-int smbldap_add(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
-int smbldap_delete(struct smbldap_state *ldap_state, const char *dn);
-int smbldap_extended_operation(struct smbldap_state *ldap_state, 
-                              LDAP_CONST char *reqoid, struct berval *reqdata, 
-                              LDAPControl **serverctrls, LDAPControl **clientctrls, 
-                              char **retoidp, struct berval **retdatap);
-int smbldap_search_suffix (struct smbldap_state *ldap_state,
-                          const char *filter, const char **search_attr,
-                          LDAPMessage ** result);
-void smbldap_free_struct(struct smbldap_state **ldap_state) ;
-NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx,
-                     const char *location,
-                     struct smbldap_state **smbldap_state);
-bool smbldap_has_control(LDAP *ld, const char *control);
-bool smbldap_has_extension(LDAP *ld, const char *extension);
-bool smbldap_has_naming_context(LDAP *ld, const char *naming_context);
-bool smbldap_set_creds(struct smbldap_state *ldap_state, bool anon, const char *dn, const char *secret);
-
-/* The following definitions come from lib/smbldap_util.c  */
-
-NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state,
-                                    LDAPMessage ** result, const char *domain_name,
-                                    bool try_add);
-
 /* The following definitions come from lib/smbrun.c  */
 
 int smbrun_no_sanitize(const char *cmd, int *outfd);
@@ -3943,6 +3906,8 @@ NTSTATUS make_pdb_method( struct pdb_methods **methods ) ;
 
 /* The following definitions come from passdb/pdb_ldap.c  */
 
+struct ldapsam_privates;
+
 const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
 int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state,
                                          const char *user,
@@ -3954,6 +3919,8 @@ NTSTATUS pdb_ldap_init(void);
 
 /* The following definitions come from passdb/pdb_nds.c  */
 
+struct smbldap_state;
+
 int pdb_nds_get_password(
        struct smbldap_state *ldap_state,
        char *object_dn,
index 060fcc21eb0ff77e798ff6591ede5b60cf868ed7..ffe618d4f7ba1323375169b01266cad9790403a4 100644 (file)
@@ -233,6 +233,43 @@ char *smbldap_talloc_dn(TALLOC_CTX *mem_ctx, LDAP *ld,
                              LDAPMessage *entry);
 
 
+/* The following definitions come from lib/smbldap.c  */
+
+int smb_ldap_start_tls(LDAP *ldap_struct, int version);
+int smb_ldap_setup_full_conn(LDAP **ldap_struct, const char *uri);
+int smbldap_search(struct smbldap_state *ldap_state,
+                  const char *base, int scope, const char *filter,
+                  const char *attrs[], int attrsonly,
+                  LDAPMessage **res);
+int smbldap_search_paged(struct smbldap_state *ldap_state,
+                        const char *base, int scope, const char *filter,
+                        const char **attrs, int attrsonly, int pagesize,
+                        LDAPMessage **res, void **cookie);
+int smbldap_modify(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
+int smbldap_add(struct smbldap_state *ldap_state, const char *dn, LDAPMod *attrs[]);
+int smbldap_delete(struct smbldap_state *ldap_state, const char *dn);
+int smbldap_extended_operation(struct smbldap_state *ldap_state,
+                              LDAP_CONST char *reqoid, struct berval *reqdata,
+                              LDAPControl **serverctrls, LDAPControl **clientctrls,
+                              char **retoidp, struct berval **retdatap);
+int smbldap_search_suffix (struct smbldap_state *ldap_state,
+                          const char *filter, const char **search_attr,
+                          LDAPMessage ** result);
+void smbldap_free_struct(struct smbldap_state **ldap_state) ;
+NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx, struct event_context *event_ctx,
+                     const char *location,
+                     struct smbldap_state **smbldap_state);
+bool smbldap_has_control(LDAP *ld, const char *control);
+bool smbldap_has_extension(LDAP *ld, const char *extension);
+bool smbldap_has_naming_context(LDAP *ld, const char *naming_context);
+bool smbldap_set_creds(struct smbldap_state *ldap_state, bool anon, const char *dn, const char *secret);
+
+/* The following definitions come from lib/smbldap_util.c  */
+
+NTSTATUS smbldap_search_domain_info(struct smbldap_state *ldap_state,
+                                    LDAPMessage ** result, const char *domain_name,
+                                    bool try_add);
+
 #else
 #define LDAP void
 #define LDAPMessage void
index 97d89dc88d4c992aa1b386db964073327450776c..3525876ecf57d9dbfc130f7c040a008d8199e9dd 100644 (file)
@@ -27,6 +27,7 @@
 #include "libads/cldap.h"
 #include "libads/dns.h"
 #include "../libds/common/flags.h"
+#include "smbldap.h"
 
 #ifdef HAVE_LDAP
 
index 96bad4da327dce92fd1d2ce64dd0cbc5335aaabe..454f0a9c41b37c7974a9b582cb4bdf4d03674b0d 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "includes.h"
 #include "libnet/libnet_samsync.h"
+#include "smbldap.h"
 
 #ifdef HAVE_LDAP
 
index 4ae699ac2a47f6612ef982a01a4fd24ca2d8a416..4567f3602dc42e06a97b30a67ef22caf85df1b62 100644 (file)
@@ -62,6 +62,7 @@
 
 #include "smb_signing.h"
 #include "dbwrap.h"
+#include "smbldap.h"
 
 #ifdef HAVE_SYS_SYSCTL_H
 #include <sys/sysctl.h>
index a5be7146311bc73b92cba40d8609b881b8f76847..ff2a8db9fdc890374baba6038bd0267dca5c0ebb 100644 (file)
@@ -21,6 +21,7 @@
 #include "includes.h"
 #include "utils/net.h"
 #include "../librpc/gen_ndr/samr.h"
+#include "smbldap.h"
 
 /*
  * Set a user's data