s4:librpc/tests: reset the object on the binding created from the tower
authorStefan Metzmacher <metze@samba.org>
Mon, 10 Mar 2014 14:52:49 +0000 (15:52 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 24 Mar 2014 23:45:29 +0000 (00:45 +0100)
The tower doesn't contain information about the object only about
the abstract syntax.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/librpc/tests/binding_string.c

index 08d7e238b1671d78e7182c1ae29e6e8b170ba851..ea86a8cba058434df187b435e373810fa0596612 100644 (file)
@@ -35,11 +35,14 @@ static bool test_BindingString(struct torture_context *tctx,
        struct epm_tower tower;
        TALLOC_CTX *mem_ctx = tctx;
        const char *host;
+       struct GUID object;
 
        /* Parse */
        torture_assert_ntstatus_ok(tctx, dcerpc_parse_binding(mem_ctx, binding, &b),
                "Error parsing binding string");
 
+       object = dcerpc_binding_get_object(b);
+
        s = dcerpc_binding_string(mem_ctx, b);
        torture_assert(tctx, s != NULL, "Error converting binding back to string");
 
@@ -55,6 +58,10 @@ static bool test_BindingString(struct torture_context *tctx,
        torture_assert_ntstatus_ok(tctx, dcerpc_binding_from_tower(mem_ctx, &tower, &b2),
                            "Error generating binding from tower for original binding");
 
+       /* The tower doesn't contain the object */
+       torture_assert_ntstatus_ok(tctx, dcerpc_binding_set_object(b2, object),
+                           "set object on tower binding");
+
        s = dcerpc_binding_string(mem_ctx, b);
        torture_assert(tctx, s != NULL, "Error converting binding back to string for (stripped down)");