diff options
author | Günther Deschner <gd@samba.org> | 2008-04-29 20:11:02 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-04-29 20:22:01 +0200 |
commit | 1223574c7b4833092887653139cf8308d3260b36 (patch) | |
tree | 7375b590084063bf452478a4ec7dd47bb1dcabb9 /source3/lib | |
parent | d0411c19dc847919b2a7941d91d2605c885e2b62 (diff) | |
download | samba-1223574c7b4833092887653139cf8308d3260b36.tar.gz samba-1223574c7b4833092887653139cf8308d3260b36.tar.bz2 samba-1223574c7b4833092887653139cf8308d3260b36.zip |
netapi: fix returned name buffer in NetGetJoinInformation_r().
Guenther
(This used to be commit 0e8e05d556a7f84e500cca3fa858f9b4a9522a5f)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/netapi/joindomain.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c index 8e0a62e820..74ed8f2302 100644 --- a/source3/lib/netapi/joindomain.c +++ b/source3/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; } |