svn commit: samba r20992 - in branches/SAMBA_3_0/source: include nsswitch

jerry at samba.org jerry at samba.org
Wed Jan 24 04:44:27 GMT 2007


Author: jerry
Date: 2007-01-24 04:44:27 +0000 (Wed, 24 Jan 2007)
New Revision: 20992

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20992

Log:
another attempt at fixing the build breakage
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/winbindd.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/includes.h
===================================================================
--- branches/SAMBA_3_0/source/include/includes.h	2007-01-24 04:34:19 UTC (rev 20991)
+++ branches/SAMBA_3_0/source/include/includes.h	2007-01-24 04:44:27 UTC (rev 20992)
@@ -777,6 +777,8 @@
 
 #ifdef HAVE_LDAP
 #include "ads_protos.h"
+#else
+typedef LDAPMessage void;
 #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 04:34:19 UTC (rev 20991)
+++ branches/SAMBA_3_0/source/include/nss_info.h	2007-01-24 04:44:27 UTC (rev 20992)
@@ -20,6 +20,8 @@
    Boston, MA  02111-1307, USA.   
 */
 
+#ifdef WITH_ADS
+
 #ifndef _IDMAP_NSS_H
 #define _IDMAP_NSS_H
 
@@ -60,13 +62,31 @@
 	NTSTATUS (*get_nss_info)( struct nss_domain_entry *e, 
 				  const DOM_SID *sid, 
 				  TALLOC_CTX *ctx, 
-#ifdef WITH_ADS
 				  ADS_STRUCT *ads, LDAPMessage *msg,
-#else
-				  void *ads, void *msg,
-#endif
 				  char **homedir, char **shell, char **gecos, gid_t *p_gid);
 	NTSTATUS (*close_fn)( void );
 };
 
+
+/* The following definitions come from nsswitch/nss_info.c  */
+
+NTSTATUS smb_register_idmap_nss(int version, 
+				const char *name, 
+				struct nss_info_methods *methods);
+
+NTSTATUS nss_init( const char **nss_list );
+
+NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
+                       TALLOC_CTX *ctx,
+		       ADS_STRUCT *ads, LDAPMessage *msg,
+                       char **homedir, char **shell, char **gecos,
+                       gid_t *p_gid);
+
+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 04:34:19 UTC (rev 20991)
+++ branches/SAMBA_3_0/source/nsswitch/nss_info.c	2007-01-24 04:44:27 UTC (rev 20992)
@@ -20,6 +20,8 @@
    Boston, MA  02111-1307, USA.   
 */
 
+#ifdef WITH_ADS
+
 #include "includes.h"
 #include "nss_info.h"
 
@@ -27,23 +29,6 @@
 static struct nss_domain_entry *nss_domain_list = NULL;
 
 /**********************************************************************
- **********************************************************************/
-
-const char *wb_posix_map_str(enum wb_posix_mapping mtype)
-{
-	switch (mtype) {
-		case WB_POSIX_MAP_SFU:
-			return "sfu";
-		case WB_POSIX_MAP_RFC2307:
-			return "rfc2307";
-		default:
-			break;
-	}
-	return NULL;
-}
-
-
-/**********************************************************************
  Get idmap nss methods.
 **********************************************************************/
 
@@ -63,7 +48,7 @@
  Allow a module to register itself as a backend.
 **********************************************************************/
 
-NTSTATUS smb_register_idmap_nss(int version, const char *name, struct nss_info_methods *methods)
+ NTSTATUS smb_register_idmap_nss(int version, const char *name, struct nss_info_methods *methods)
 {
 	struct nss_function_entry *entry;
 
@@ -145,7 +130,7 @@
  to initialize the state on a per domain basis.
  *******************************************************************/
 
-NTSTATUS nss_init( const char **nss_list )
+ NTSTATUS nss_init( const char **nss_list )
 {
 	NTSTATUS status;
 	int i;
@@ -230,7 +215,7 @@
 /********************************************************************
  *******************************************************************/
 
-NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
+ NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
 		       TALLOC_CTX *ctx,
 		       ADS_STRUCT *ads, LDAPMessage *msg,
 		       char **homedir, char **shell, char **gecos,
@@ -263,7 +248,7 @@
 /********************************************************************
  *******************************************************************/
 
-NTSTATUS nss_close( const char *parameters )
+ NTSTATUS nss_close( const char *parameters )
 {
 	struct nss_domain_entry *p = nss_domain_list;
 	struct nss_domain_entry *q;
@@ -285,7 +270,7 @@
  Invoke the init function for a given domain's backend
  *******************************************************************/
 
-NTSTATUS idmap_nss_init_domain( const char *domain )
+ NTSTATUS idmap_nss_init_domain( const char *domain )
 {
 	struct nss_domain_entry *p;
 	
@@ -303,3 +288,5 @@
 	return NT_STATUS_NO_SUCH_DOMAIN;	
 }
 
+#endif /* WITH_ADS */
+

Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd.c	2007-01-24 04:34:19 UTC (rev 20991)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd.c	2007-01-24 04:44:27 UTC (rev 20992)
@@ -1009,7 +1009,9 @@
 		DEBUG(1, ("Could not init idmap! - Sid/[UG]id mapping will not be available\n"));
 	}
 
+#ifdef WITH_ADS
 	nss_init( lp_winbind_nss_info() );
+#endif
 
 	/* Unblock all signals we are interested in as they may have been
 	   blocked by the parent process. */



More information about the samba-cvs mailing list