svn commit: samba r9907 - in branches/tmp/RPCREWRITE/source:
rpc_parse rpcclient
jra at samba.org
jra at samba.org
Thu Sep 1 16:59:17 GMT 2005
Author: jra
Date: 2005-09-01 16:59:16 +0000 (Thu, 01 Sep 2005)
New Revision: 9907
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9907
Log:
Ensure MARSHALLING prs buffers are dynamic by default. Fix
crash. Now to fix the underlying bind code (sends 2 bytes short).
Jeremy.
Modified:
branches/tmp/RPCREWRITE/source/rpc_parse/parse_prs.c
branches/tmp/RPCREWRITE/source/rpcclient/rpcclient.c
Changeset:
Modified: branches/tmp/RPCREWRITE/source/rpc_parse/parse_prs.c
===================================================================
--- branches/tmp/RPCREWRITE/source/rpc_parse/parse_prs.c 2005-09-01 15:46:07 UTC (rev 9906)
+++ branches/tmp/RPCREWRITE/source/rpc_parse/parse_prs.c 2005-09-01 16:59:16 UTC (rev 9907)
@@ -108,6 +108,9 @@
}
memset(ps->data_p, '\0', (size_t)size);
ps->is_dynamic = True; /* We own this memory. */
+ } else if (MARSHALLING(ps)) {
+ /* If size is zero and we're marshalling we should allocate memory on demand. */
+ ps->is_dynamic = True;
}
return True;
Modified: branches/tmp/RPCREWRITE/source/rpcclient/rpcclient.c
===================================================================
--- branches/tmp/RPCREWRITE/source/rpcclient/rpcclient.c 2005-09-01 15:46:07 UTC (rev 9906)
+++ branches/tmp/RPCREWRITE/source/rpcclient/rpcclient.c 2005-09-01 16:59:16 UTC (rev 9907)
@@ -139,7 +139,7 @@
goto error;
}
- if ((lsapipe = cli_rpc_pipe_open_noauth(cli, PI_LSARPC)) != NULL) {
+ if ((lsapipe = cli_rpc_pipe_open_noauth(cli, PI_LSARPC)) == NULL) {
fprintf(stderr, "could not initialise lsa pipe\n");
goto error;
}
More information about the samba-cvs
mailing list