Author: jerry Date: 2007-01-24 14:39:46 +0000 (Wed, 24 Jan 2007) New Revision: 21001
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21001 Log: * Use a simple '#define LDAPMessage void' to fix the build problems in the nss_info interface when HAVE_LDAP is undefined. * Revert previous ifdef HAVE_ADS brakets * Remove an unused init function wrapper. Modified: branches/SAMBA_3_0/source/include/includes.h branches/SAMBA_3_0/source/include/nss_info.h branches/SAMBA_3_0/source/nsswitch/nss_info.c branches/SAMBA_3_0/source/nsswitch/nss_info_template.c branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c Changeset: Modified: branches/SAMBA_3_0/source/include/includes.h =================================================================== --- branches/SAMBA_3_0/source/include/includes.h 2007-01-24 12:46:26 UTC (rev 21000) +++ branches/SAMBA_3_0/source/include/includes.h 2007-01-24 14:39:46 UTC (rev 21001) @@ -777,9 +777,6 @@ #ifdef HAVE_LDAP #include "ads_protos.h" -#else -struct _LDAPMessage; -typedef struct _LDAPMessage *LDAPMessage; #endif /* We need this after proto.h to reference GetTimeOfDay(). */ Modified: branches/SAMBA_3_0/source/include/nss_info.h =================================================================== --- branches/SAMBA_3_0/source/include/nss_info.h 2007-01-24 12:46:26 UTC (rev 21000) +++ branches/SAMBA_3_0/source/include/nss_info.h 2007-01-24 14:39:46 UTC (rev 21001) @@ -20,11 +20,15 @@ Boston, MA 02111-1307, USA. */ -#ifdef WITH_ADS - #ifndef _IDMAP_NSS_H #define _IDMAP_NSS_H +#ifndef HAVE_LDAP +# ifndef LDAPMessage +# define LDAPMessage void +# endif +#endif + /* The interface version specifier */ #define SMB_NSS_INFO_INTERFACE_VERSION 1 @@ -84,9 +88,5 @@ NTSTATUS nss_close( const char *parameters ); -NTSTATUS idmap_nss_init_domain( const char *domain ); - - #endif /* _IDMAP_NSS_H_ */ -#endif /* WITH_ADS */ Modified: branches/SAMBA_3_0/source/nsswitch/nss_info.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/nss_info.c 2007-01-24 12:46:26 UTC (rev 21000) +++ branches/SAMBA_3_0/source/nsswitch/nss_info.c 2007-01-24 14:39:46 UTC (rev 21001) @@ -20,8 +20,6 @@ Boston, MA 02111-1307, USA. */ -#ifdef WITH_ADS - #include "includes.h" #include "nss_info.h" @@ -266,27 +264,3 @@ return NT_STATUS_OK; } -/******************************************************************** - Invoke the init function for a given domain's backend - *******************************************************************/ - - NTSTATUS idmap_nss_init_domain( const char *domain ) -{ - struct nss_domain_entry *p; - - DEBUG(10,("idmap_nss_init_domain: Searching for %s's init() function\n", - domain)); - - for ( p=nss_domain_list; p; p=p->next ) { - if ( strequal( p->domain, domain ) ) { - DEBUG(10,("idmap_nss_init_domain: Calling init function for %s\n", - domain)); - return p->backend->methods->init( p ); - } - } - - return NT_STATUS_NO_SUCH_DOMAIN; -} - -#endif /* WITH_ADS */ - Modified: branches/SAMBA_3_0/source/nsswitch/nss_info_template.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/nss_info_template.c 2007-01-24 12:46:26 UTC (rev 21000) +++ branches/SAMBA_3_0/source/nsswitch/nss_info_template.c 2007-01-24 14:39:46 UTC (rev 21001) @@ -20,8 +20,6 @@ Boston, MA 02111-1307, USA. */ -#ifdef WITH_ADS - #include "includes.h" #include "nss_info.h" @@ -73,9 +71,9 @@ ***********************************************************************/ static struct nss_info_methods nss_template_methods = { - nss_template_init, - nss_template_get_info, - nss_template_close + .init = nss_template_init, + .get_nss_info = nss_template_get_info, + .close_fn = nss_template_close }; NTSTATUS nss_info_template_init( void ) @@ -85,4 +83,3 @@ &nss_template_methods); } -#endif /* WITH_ADS */ Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c 2007-01-24 12:46:26 UTC (rev 21000) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c 2007-01-24 14:39:46 UTC (rev 21001) @@ -125,10 +125,6 @@ return NULL; } - /* initialize the nss backend for this domain */ - - idmap_nss_init_domain( domain->name ); - /* set the flag that says we don't own the memory even though we do so that ads_destroy() won't destroy the structure we pass back by reference */