svn commit: samba r17913 - in branches/SAMBA_3_0_RELEASE/source: auth smbd

jerry at samba.org jerry at samba.org
Tue Aug 29 16:02:51 GMT 2006


Author: jerry
Date: 2006-08-29 16:02:51 +0000 (Tue, 29 Aug 2006)
New Revision: 17913

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

Log:
saturn fixes from SAMBA_3_0_23
Modified:
   branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c
   branches/SAMBA_3_0_RELEASE/source/smbd/lanman.c


Changeset:
Modified: branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c	2006-08-29 16:01:18 UTC (rev 17912)
+++ branches/SAMBA_3_0_RELEASE/source/auth/auth_util.c	2006-08-29 16:02:51 UTC (rev 17913)
@@ -1927,17 +1927,20 @@
 		return NULL;
 	}
 
-	token->user_sids = talloc_memdup(token, ptoken->user_sids,
+	ZERO_STRUCTP(token);
+
+	if (ptoken->user_sids && ptoken->num_sids) {
+		token->user_sids = talloc_memdup(token, ptoken->user_sids,
 					 sizeof(DOM_SID) * ptoken->num_sids );
 
-	if ((ptoken->user_sids != NULL) && (token->user_sids == NULL)) {
-		DEBUG(0, ("talloc_memdup failed\n"));
-		TALLOC_FREE(token);
-		return NULL;
+		if (token->user_sids == NULL) {
+			DEBUG(0, ("talloc_memdup failed\n"));
+			TALLOC_FREE(token);
+			return NULL;
+		}
+		token->num_sids = ptoken->num_sids;
 	}
 
-	token->num_sids = ptoken->num_sids;
-	
 	/* copy the privileges; don't consider failure to be critical here */
 	
 	if ( !se_priv_copy( &token->privileges, &ptoken->privileges ) ) {

Modified: branches/SAMBA_3_0_RELEASE/source/smbd/lanman.c
===================================================================
--- branches/SAMBA_3_0_RELEASE/source/smbd/lanman.c	2006-08-29 16:01:18 UTC (rev 17912)
+++ branches/SAMBA_3_0_RELEASE/source/smbd/lanman.c	2006-08-29 16:02:51 UTC (rev 17913)
@@ -1183,12 +1183,8 @@
 				break;
 		}
 
-		if (buflen) {
-			*buflen = struct_len;
-		}
-		if (stringspace) {
-			*stringspace = len;
-		}
+		*buflen = struct_len;
+		*stringspace = len;
 		return struct_len + len;
 	}
   



More information about the samba-cvs mailing list