summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-05-25 00:27:17 +0200
committerGünther Deschner <gd@samba.org>2008-05-26 12:21:11 +0200
commitb83131a16fa7b06b03cd66296ce2409475940055 (patch)
treeb6d7aa75e27399c5e7f3f1bd735fdc53862c143d
parent33f632b8b5d39c06da37adf4feb0d1552dd96647 (diff)
downloadsamba-b83131a16fa7b06b03cd66296ce2409475940055.tar.gz
samba-b83131a16fa7b06b03cd66296ce2409475940055.tar.bz2
samba-b83131a16fa7b06b03cd66296ce2409475940055.zip
rpcclient: simplify drsuapi dscracknames call slightly.
Guenther (This used to be commit 5611cf42530072bc244a7bed258d3ac959bd0b65)
-rw-r--r--source3/rpcclient/cmd_drsuapi.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/source3/rpcclient/cmd_drsuapi.c b/source3/rpcclient/cmd_drsuapi.c
index 759985d134..f625aa6300 100644
--- a/source3/rpcclient/cmd_drsuapi.c
+++ b/source3/rpcclient/cmd_drsuapi.c
@@ -30,12 +30,10 @@ static WERROR cmd_drsuapi_cracknames(struct rpc_pipe_client *cli,
int i;
struct GUID bind_guid;
- struct drsuapi_DsBindInfoCtr bind_info;
struct policy_handle bind_handle;
int32_t level = 1;
union drsuapi_DsNameRequest req;
- struct drsuapi_DsNameRequest1 req1;
int32_t level_out;
union drsuapi_DsNameCtr ctr;
struct drsuapi_DsNameString names[1];
@@ -45,8 +43,6 @@ static WERROR cmd_drsuapi_cracknames(struct rpc_pipe_client *cli,
return WERR_OK;
}
- ZERO_STRUCT(bind_info);
-
GUID_from_string(DRSUAPI_DS_BIND_GUID, &bind_guid);
status = rpccli_drsuapi_DsBind(cli, mem_ctx,
@@ -59,19 +55,15 @@ static WERROR cmd_drsuapi_cracknames(struct rpc_pipe_client *cli,
return ntstatus_to_werror(status);
}
- ZERO_STRUCT(req1);
-
names[0].str = argv[1];
- req1.codepage = 1252; /* german */
- req1.language = 0x00000407; /* german */
- req1.count = 1;
- req1.names = names;
- req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
- req1.format_offered = DRSUAPI_DS_NAME_FORMAT_UKNOWN;
- req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
-
- req.req1 = req1;
+ req.req1.codepage = 1252; /* german */
+ req.req1.language = 0x00000407; /* german */
+ req.req1.count = 1;
+ req.req1.names = names;
+ req.req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
+ req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_UKNOWN;
+ req.req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
status = rpccli_drsuapi_DsCrackNames(cli, mem_ctx,
&bind_handle,