svn commit: samba r18104 - in branches/SAMBA_4_0/source/libnet: .

mimir at samba.org mimir at samba.org
Tue Sep 5 18:45:04 GMT 2006


Author: mimir
Date: 2006-09-05 18:45:03 +0000 (Tue, 05 Sep 2006)
New Revision: 18104

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

Log:
A couple of important fixes to samr domain open so that
the corresponding test may pass.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/libnet_domain.c


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_domain.c
===================================================================
--- branches/SAMBA_4_0/source/libnet/libnet_domain.c	2006-09-05 18:39:48 UTC (rev 18103)
+++ branches/SAMBA_4_0/source/libnet/libnet_domain.c	2006-09-05 18:45:03 UTC (rev 18104)
@@ -267,7 +267,7 @@
 	s->ctx                 = ctx;
 	s->pipe                = ctx->samr.pipe;
 	s->access_mask         = io->in.access_mask;
-	s->domain_name.string  = io->in.domain_name;
+	s->domain_name.string  = talloc_strdup(c, io->in.domain_name);
 
 	/* check, if there's samr pipe opened already, before opening a domain */
 	if (ctx->samr.pipe == NULL) {
@@ -360,7 +360,7 @@
 		/* store the resulting handle and related data for use by other
 		   libnet functions */
 		ctx->samr.handle      = s->domain_handle;
-		ctx->samr.name        = talloc_strdup(ctx, s->domain_name.string);
+		ctx->samr.name        = talloc_steal(ctx, s->domain_name.string);
 		ctx->samr.access_mask = s->access_mask;
 	}
 
@@ -739,6 +739,7 @@
 
 struct domain_close_samr_state {
 	struct samr_Close close;
+	struct policy_handle handle;
 	
 	void (*monitor_fn)(struct monitor_msg*);
 };
@@ -773,7 +774,9 @@
 	}
 
 	/* prepare close domain handle call arguments */
-	s->close.in.handle = &ctx->samr.handle;
+	ZERO_STRUCT(s->close);
+	s->close.in.handle  = &ctx->samr.handle;
+	s->close.out.handle = &s->handle;
 
 	/* send the request */
 	close_req = dcerpc_samr_Close_send(ctx->samr.pipe, ctx, &s->close);



More information about the samba-cvs mailing list