diff options
author | Günther Deschner <gd@samba.org> | 2010-08-26 14:07:20 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-09-20 13:54:56 -0700 |
commit | 62544c5d2b9caab818ce82eb0b3877854a9719b6 (patch) | |
tree | cb1c732332b721f00ae76fe4300a267d1577c34b | |
parent | 8e16d6dbdfdbfd42de32497d92f3fae32cd39ba4 (diff) | |
download | samba-62544c5d2b9caab818ce82eb0b3877854a9719b6.tar.gz samba-62544c5d2b9caab818ce82eb0b3877854a9719b6.tar.bz2 samba-62544c5d2b9caab818ce82eb0b3877854a9719b6.zip |
s3-build: only include smbldap.h where needed.
Guenther
-rw-r--r-- | source3/include/includes.h | 4 | ||||
-rw-r--r-- | source3/include/proto.h | 41 | ||||
-rw-r--r-- | source3/include/smbldap.h | 37 | ||||
-rw-r--r-- | source3/libads/ldap.c | 1 | ||||
-rw-r--r-- | source3/libnet/libnet_samsync_ldif.c | 1 | ||||
-rw-r--r-- | source3/param/loadparm.c | 1 | ||||
-rw-r--r-- | source3/utils/net_sam.c | 1 |
7 files changed, 45 insertions, 41 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index b185ce261d..7626a53abc 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -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. */ diff --git a/source3/include/proto.h b/source3/include/proto.h index c104f06032..9902198067 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -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, diff --git a/source3/include/smbldap.h b/source3/include/smbldap.h index 060fcc21eb..ffe618d4f7 100644 --- a/source3/include/smbldap.h +++ b/source3/include/smbldap.h @@ -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 diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 97d89dc88d..3525876ecf 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -27,6 +27,7 @@ #include "libads/cldap.h" #include "libads/dns.h" #include "../libds/common/flags.h" +#include "smbldap.h" #ifdef HAVE_LDAP diff --git a/source3/libnet/libnet_samsync_ldif.c b/source3/libnet/libnet_samsync_ldif.c index 96bad4da32..454f0a9c41 100644 --- a/source3/libnet/libnet_samsync_ldif.c +++ b/source3/libnet/libnet_samsync_ldif.c @@ -25,6 +25,7 @@ #include "includes.h" #include "libnet/libnet_samsync.h" +#include "smbldap.h" #ifdef HAVE_LDAP diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 4ae699ac2a..4567f3602d 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -62,6 +62,7 @@ #include "smb_signing.h" #include "dbwrap.h" +#include "smbldap.h" #ifdef HAVE_SYS_SYSCTL_H #include <sys/sysctl.h> diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c index a5be714631..ff2a8db9fd 100644 --- a/source3/utils/net_sam.c +++ b/source3/utils/net_sam.c @@ -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 |