svn commit: samba r23634 - in branches/SAMBA_3_0_26/source: nsswitch rpc_server

jerry at samba.org jerry at samba.org
Wed Jun 27 16:53:56 GMT 2007


Author: jerry
Date: 2007-06-27 16:53:56 +0000 (Wed, 27 Jun 2007)
New Revision: 23634

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

Log:
Squashed commit of the following:

commit 46e46d8e2ac45db6b9d8cb0ea05fae36c900ea2c
Author: Gerald (Jerry) Carter <jerry at samba.org>
Date:   Wed Jun 27 11:29:10 2007 -0500

    Fix a couple of crash bugs pointed out by Volker caused by an old
    change from a pstring to a char* and still trying use pstrcpy().

commit 64b89f90b8207ba8b9cd0f77e40912c0acaddc99
Author: Gerald (Jerry) Carter <jerry at samba.org>
Date:   Wed Jun 27 08:27:34 2007 -0500

    Correctly return the new_group list pointer from expand_groups
    or else getgrnam() always  acts like 'winbind expand groups = 1'

Modified:
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c
   branches/SAMBA_3_0_26/source/rpc_server/srv_winreg_nt.c


Changeset:
Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c	2007-06-27 16:52:36 UTC (rev 23633)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c	2007-06-27 16:53:56 UTC (rev 23634)
@@ -456,7 +456,7 @@
 		TALLOC_FREE( tmp_ctx );
 	}
 
-	new_glist = &new_groups;
+	*new_glist = new_groups;
 	*n_new_glist = (uint32)new_groups_size;	
 	
  out:

Modified: branches/SAMBA_3_0_26/source/rpc_server/srv_winreg_nt.c
===================================================================
--- branches/SAMBA_3_0_26/source/rpc_server/srv_winreg_nt.c	2007-06-27 16:52:36 UTC (rev 23633)
+++ branches/SAMBA_3_0_26/source/rpc_server/srv_winreg_nt.c	2007-06-27 16:53:56 UTC (rev 23634)
@@ -763,7 +763,12 @@
 			topkeypath ));
 		return WERR_BADFILE;
 	}
-	pstrcpy( registry_key.name, topkeypath );
+
+	registry_key.name = talloc_strdup( regfile->mem_ctx, topkeypath );
+	if ( !registry_key.name ) {
+		DEBUG(0,("reg_load_tree: Talloc failed for reg_key.name!\n"));
+		return WERR_NOMEM;
+	}
 	
 	/* now start parsing the values and subkeys */
 
@@ -912,7 +917,11 @@
 	/* we need a REGISTRY_KEY object here to enumerate subkeys and values */
 	
 	ZERO_STRUCT( registry_key );
-	pstrcpy( registry_key.name, keypath );
+	registry_key.name = talloc_strdup( regfile->mem_ctx, keypath );
+	if ( !registry_key.name ) {
+		DEBUG(0,("reg_load_tree: Talloc failed for reg_key.name!\n"));
+		return WERR_NOMEM;
+	}
 	if ( !(registry_key.hook = reghook_cache_find( registry_key.name )) )
 		return WERR_BADFILE;
 



More information about the samba-cvs mailing list