summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2016-11-11 11:47:20 +0100
committerJeremy Allison <jra@samba.org>2016-11-11 22:57:23 +0100
commita76cb3118e9ee1f4c2ece2c09f01589a840967bf (patch)
tree1bbe3839902eea760802eeb0e8df8aec320846bf /source3/rpcclient
parent574dd65a8185c90828e49b295d89153bae1563bf (diff)
downloadsamba-a76cb3118e9ee1f4c2ece2c09f01589a840967bf.tar.gz
s3-rpcclient: add object_uuid argument to cmd_epmapper_map()
This allows to test how an epmap-server deals with object_uuid during the epm_Map call. On windows the object_uuid is always ignored expect for the case when the first abstract_syntax in the tower is the mgmt service. Even in that case, the role of the object_uuid is still unclear. Guenther Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_epmapper.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_epmapper.c b/source3/rpcclient/cmd_epmapper.c
index 7753df24709..289b086718f 100644
--- a/source3/rpcclient/cmd_epmapper.c
+++ b/source3/rpcclient/cmd_epmapper.c
@@ -42,10 +42,13 @@ static NTSTATUS cmd_epmapper_map(struct rpc_pipe_client *p,
const char *interface_name = "lsarpc";
enum dcerpc_transport_t transport = NCACN_NP;
bool ok = false;
+ struct GUID object_uuid = GUID_zero();
- if (argc > 3) {
- d_fprintf(stderr, "Usage: %s [interface_name] [transport]\n",
- argv[0]);
+ if (argc > 4) {
+ d_fprintf(stderr,
+ "Usage: %s [interface_name] [transport] "
+ "[object_uuid]\n",
+ argv[0]);
return NT_STATUS_OK;
}
@@ -79,6 +82,13 @@ static NTSTATUS cmd_epmapper_map(struct rpc_pipe_client *p,
}
}
+ if (argc >= 4) {
+ status = GUID_from_string(argv[3], &object_uuid);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto done;
+ }
+ }
+
/* 127.0.0.1[0] => correct? needed? */
status = dcerpc_parse_binding(tmp_ctx, "ncacn_np:127.0.0.1[0]",
&map_binding);
@@ -115,7 +125,7 @@ static NTSTATUS cmd_epmapper_map(struct rpc_pipe_client *p,
ZERO_STRUCT(entry_handle);
status = dcerpc_epm_Map(
- b, tmp_ctx, &abstract_syntax.uuid,
+ b, tmp_ctx, &object_uuid,
&map_tower, &entry_handle, ARRAY_SIZE(towers),
&num_towers, towers, &result);
if (!NT_STATUS_IS_OK(status)) {