From eb61c8238298e97644202139e6d7f55e46eb9c26 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 25 Jun 2003 12:51:58 +0000 Subject: Patch to move functions directly from pdb_ldap.c into lib/smbldap.c The functions are unchanged. Next step is to make idmap_ldap use them. Andrew Bartlett (This used to be commit 57617a0f8c84f9ced4df2901811ce5a5a5ae005e) --- source3/include/smbldap.h | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) (limited to 'source3/include') diff --git a/source3/include/smbldap.h b/source3/include/smbldap.h index 31f8d33b88..5f3606aa32 100644 --- a/source3/include/smbldap.h +++ b/source3/include/smbldap.h @@ -19,11 +19,11 @@ */ -#ifdef HAVE_LDAP - #ifndef _SMBLDAP_H #define _SMBLDAP_H +#ifdef HAVE_LDAP + /* specify schema versions between 2.2. and 3.0 */ #define SCHEMAVER_SAMBAACCOUNT 1 @@ -93,17 +93,6 @@ typedef struct _attrib_map_entry { } ATTRIB_MAP_ENTRY; -struct smbldap_state { - LDAP *ldap_struct; - time_t last_ping; - /* retrive-once info */ - const char *uri; - char *bind_dn; - char *bind_secret; - - unsigned int num_failures; -}; - /* structures */ extern ATTRIB_MAP_ENTRY attrib_map_v22[]; @@ -120,9 +109,30 @@ extern ATTRIB_MAP_ENTRY sidmap_attr_list[]; const char* get_attr_key2string( ATTRIB_MAP_ENTRY table[], int key ); char** get_attr_list( ATTRIB_MAP_ENTRY table[] ); void free_attr_list( char **list ); -BOOL fetch_ldap_pw(char **dn, char** pw); void smbldap_set_mod (LDAPMod *** modlist, int modop, const char *attribute, const char *value); +void smbldap_make_mod(LDAP *ldap_struct, LDAPMessage *existing, + LDAPMod ***mods, + const char *attribute, const char *newval); -#endif /* _SMBLDAP_H */ +/** + * Struct to keep the state for all the ldap stuff + * + */ + +struct smbldap_state { + LDAP *ldap_struct; + time_t last_ping; + /* retrive-once info */ + const char *uri; + char *bind_dn; + char *bind_secret; + + unsigned int num_failures; +}; #endif /* HAVE_LDAP */ + +struct smbldap_state; + +#endif /* _SMBLDAP_H */ + -- cgit