[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-2392-g2d06726
Günther Deschner
gd at samba.org
Wed May 21 10:40:24 GMT 2008
The branch, v3-2-test has been updated
via 2d06726b7b65a9071a872ac71a09a614270c6b2c (commit)
from 46985b309f9cf3261d34746294ac13e56ac283e4 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 2d06726b7b65a9071a872ac71a09a614270c6b2c
Author: Günther Deschner <gd at samba.org>
Date: Tue Apr 29 20:11:02 2008 +0200
netapi: fix returned name buffer in NetGetJoinInformation_r().
Guenther
(cherry picked from commit 0e8e05d556a7f84e500cca3fa858f9b4a9522a5f)
-----------------------------------------------------------------------
Summary of changes:
source/lib/netapi/joindomain.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/netapi/joindomain.c b/source/lib/netapi/joindomain.c
index 8e0a62e..74ed8f2 100644
--- a/source/lib/netapi/joindomain.c
+++ b/source/lib/netapi/joindomain.c
@@ -282,6 +282,7 @@ WERROR NetGetJoinInformation_r(struct libnetapi_ctx *ctx,
struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
+ const char *buffer = NULL;
werr = libnetapi_open_ipc_connection(ctx, r->in.server_name, &cli);
if (!W_ERROR_IS_OK(werr)) {
@@ -295,7 +296,7 @@ WERROR NetGetJoinInformation_r(struct libnetapi_ctx *ctx,
status = rpccli_wkssvc_NetrGetJoinInformation(pipe_cli, ctx,
r->in.server_name,
- r->out.name_buffer,
+ &buffer,
(enum wkssvc_NetJoinStatus *)r->out.name_type,
&werr);
if (!NT_STATUS_IS_OK(status)) {
@@ -303,6 +304,9 @@ WERROR NetGetJoinInformation_r(struct libnetapi_ctx *ctx,
goto done;
}
+ *r->out.name_buffer = talloc_strdup(ctx, buffer);
+ W_ERROR_HAVE_NO_MEMORY(*r->out.name_buffer);
+
done:
return werr;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list