r19392: Use torture_setting_* rather than lp_parm_* where possible.
[gd/samba-autobuild/.git] / source4 / torture / rpc / mgmt.c
index 4ac5fa390cf5a683b70ce421fc8e23025f55022f..0da7fcb8d3778c19e07aba497273808dfe835868 100644 (file)
 */
 
 #include "includes.h"
-#include "librpc/gen_ndr/ndr_mgmt.h"
+#include "torture/torture.h"
+#include "librpc/gen_ndr/ndr_mgmt_c.h"
 #include "auth/gensec/gensec.h"
+#include "librpc/rpc/dcerpc_table.h"
+#include "torture/rpc/rpc.h"
 
 
 /*
@@ -171,13 +174,13 @@ static BOOL test_stop_server_listening(struct dcerpc_pipe *p,
 }
 
 
-BOOL torture_rpc_mgmt(void)
+BOOL torture_rpc_mgmt(struct torture_context *torture)
 {
         NTSTATUS status;
         struct dcerpc_pipe *p;
        TALLOC_CTX *mem_ctx, *loop_ctx;
        BOOL ret = True;
-       const char *binding = lp_parm_string(-1, "torture", "binding");
+       const char *binding = torture_setting_string(torture, "binding", NULL);
        const struct dcerpc_interface_list *l;
        struct dcerpc_binding *b;
 
@@ -211,7 +214,7 @@ BOOL torture_rpc_mgmt(void)
                        status = dcerpc_epm_map_binding(loop_ctx, b, l->table, NULL);
                        if (!NT_STATUS_IS_OK(status)) {
                                printf("Failed to map port for uuid %s\n", 
-                                          GUID_string(loop_ctx, &l->table->uuid));
+                                          GUID_string(loop_ctx, &l->table->syntax_id.uuid));
                                talloc_free(loop_ctx);
                                continue;
                        }