svn commit: samba r6605 - in trunk/source: client include nsswitch param registry

jerry at samba.org jerry at samba.org
Tue May 3 15:17:51 GMT 2005


Author: jerry
Date: 2005-05-03 15:17:50 +0000 (Tue, 03 May 2005)
New Revision: 6605

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

Log:
* fix the build after the talloc abd PARANOID_MALLOC_CHECKER changes
* add a comment about the free size data value in registry files



Modified:
   trunk/source/client/smbmnt.c
   trunk/source/client/smbumount.c
   trunk/source/include/smb_macros.h
   trunk/source/nsswitch/winbindd.c
   trunk/source/nsswitch/winbindd_ldap.c
   trunk/source/param/config_ldap.c
   trunk/source/registry/regfio.c


Changeset:
Modified: trunk/source/client/smbmnt.c
===================================================================
--- trunk/source/client/smbmnt.c	2005-05-03 15:15:34 UTC (rev 6604)
+++ trunk/source/client/smbmnt.c	2005-05-03 15:17:50 UTC (rev 6605)
@@ -6,6 +6,8 @@
  *
  */
 
+#define SMBMOUNT_MALLOC 1
+
 #include "includes.h"
 
 #include <mntent.h>

Modified: trunk/source/client/smbumount.c
===================================================================
--- trunk/source/client/smbumount.c	2005-05-03 15:15:34 UTC (rev 6604)
+++ trunk/source/client/smbumount.c	2005-05-03 15:17:50 UTC (rev 6605)
@@ -5,6 +5,8 @@
  *
  */
 
+#define SMBMOUNT_MALLOC 1
+
 #include "includes.h"
 
 #include <mntent.h>

Modified: trunk/source/include/smb_macros.h
===================================================================
--- trunk/source/include/smb_macros.h	2005-05-03 15:15:34 UTC (rev 6604)
+++ trunk/source/include/smb_macros.h	2005-05-03 15:17:50 UTC (rev 6605)
@@ -285,8 +285,13 @@
 #define TALLOC_REALLOC_ARRAY(ctx, ptr, type, count) (type *)_talloc_realloc_array(ctx, ptr, sizeof(type), count, #type)
 #define talloc_destroy(ctx) talloc_free(ctx)
 
-#define PARANOID_MALLOC_CHECKER 1
+/* only define PARANOID_MALLOC_CHECKER with --enable-developer and not compiling
+   the smbmount utils */
 
+#if defined(DEVELOPER) && !defined(SMBMOUNT_MALLOC)
+#  define PARANOID_MALLOC_CHECKER 1
+#endif
+
 #if defined(PARANOID_MALLOC_CHECKER)
 
 #define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem_((ps),sizeof(type),(count))

Modified: trunk/source/nsswitch/winbindd.c
===================================================================
--- trunk/source/nsswitch/winbindd.c	2005-05-03 15:15:34 UTC (rev 6604)
+++ trunk/source/nsswitch/winbindd.c	2005-05-03 15:17:50 UTC (rev 6605)
@@ -165,6 +165,7 @@
 		 WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
 	unlink(path);
 
+#if 0
 	if (interactive) {
 		TALLOC_CTX *mem_ctx = talloc_init("end_description");
 		char *description = talloc_describe_all(mem_ctx);
@@ -172,6 +173,7 @@
 		DEBUG(3, ("tallocs left:\n%s\n", description));
 		talloc_destroy(mem_ctx);
 	}
+#endif
 
 	exit(0);
 }

Modified: trunk/source/nsswitch/winbindd_ldap.c
===================================================================
--- trunk/source/nsswitch/winbindd_ldap.c	2005-05-03 15:15:34 UTC (rev 6604)
+++ trunk/source/nsswitch/winbindd_ldap.c	2005-05-03 15:17:50 UTC (rev 6605)
@@ -449,9 +449,11 @@
 	main_loop_talloc_free();
 
 	if (do_sigterm) {
+#if 0
 		TALLOC_CTX *mem_ctx = talloc_init("describe");
 		DEBUG(0, ("%s\n", talloc_describe_all(mem_ctx)));
 		talloc_destroy(mem_ctx);
+#endif
 		exit(0);
 	}
 

Modified: trunk/source/param/config_ldap.c
===================================================================
--- trunk/source/param/config_ldap.c	2005-05-03 15:15:34 UTC (rev 6604)
+++ trunk/source/param/config_ldap.c	2005-05-03 15:17:50 UTC (rev 6605)
@@ -225,8 +225,8 @@
 	if (count) {
 		int i;
 
-		share_dn = talloc(mem_ctx, (count + 1) * sizeof(char *));
-		share_name = talloc(mem_ctx, (count) * sizeof(char *));
+		share_dn = TALLOC_ARRAY(mem_ctx, char*, count + 1);
+		share_name = TALLOC_ARRAY(mem_ctx, char*, count );
 		if (!share_dn || !share_name) {
 			DEBUG(0,("config_ldap: Out of memory!\n"));
 			goto done;

Modified: trunk/source/registry/regfio.c
===================================================================
--- trunk/source/registry/regfio.c	2005-05-03 15:15:34 UTC (rev 6604)
+++ trunk/source/registry/regfio.c	2005-05-03 15:17:50 UTC (rev 6605)
@@ -377,7 +377,9 @@
 
 	/* Find the available free space offset.  Always at the end,
 	   so walk the record list and stop when you get to the end.
-	   The end is defined by a record header of 0xffffffff */
+	   The end is defined by a record header of 0xffffffff.  The 
+	   previous 4 bytes contains the amount of free space remaining 
+	   in the hbin block. */
 
 	/* remember that the record_size is in the 4 bytes preceeding the record itself */
 



More information about the samba-cvs mailing list