s3: Make libnetapi_open_pipe take strings instead of a ndr_interface_table
authorVolker Lendecke <vl@samba.org>
Sun, 8 Nov 2009 11:31:38 +0000 (12:31 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 8 Nov 2009 12:12:16 +0000 (13:12 +0100)
12 files changed:
source3/lib/netapi/cm.c
source3/lib/netapi/file.c
source3/lib/netapi/getdc.c
source3/lib/netapi/group.c
source3/lib/netapi/joindomain.c
source3/lib/netapi/localgroup.c
source3/lib/netapi/netapi_private.h
source3/lib/netapi/netlogon.c
source3/lib/netapi/serverinfo.c
source3/lib/netapi/share.c
source3/lib/netapi/shutdown.c
source3/lib/netapi/user.c

index 9baba7b82404ba364cd76b591e548a410f39c3dc..813827d4dd8a625d9a133613d29730f84423a4ff 100644 (file)
@@ -179,10 +179,11 @@ static NTSTATUS pipe_cm_open(TALLOC_CTX *ctx,
 
 WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
                           const char *server_name,
-                          const struct ndr_syntax_id *interface,
+                          const char *interface, uint32_t interface_version,
                           struct rpc_pipe_client **presult)
 {
        struct rpc_pipe_client *result = NULL;
+       struct ndr_syntax_id syntax;
        NTSTATUS status;
        WERROR werr;
        struct cli_state *cli = NULL;
@@ -191,15 +192,19 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
                return WERR_INVALID_PARAM;
        }
 
+       if (!ndr_syntax_from_string(interface, interface_version, &syntax)) {
+               return WERR_INVALID_PARAM;
+       }
+
        werr = libnetapi_open_ipc_connection(ctx, server_name, &cli);
        if (!W_ERROR_IS_OK(werr)) {
                return werr;
        }
 
-       status = pipe_cm_open(ctx, cli, interface, &result);
+       status = pipe_cm_open(ctx, cli, &syntax, &result);
        if (!NT_STATUS_IS_OK(status)) {
                libnetapi_set_error_string(ctx, "failed to open PIPE %s: %s",
-                       get_pipe_name_from_syntax(talloc_tos(), interface),
+                       get_pipe_name_from_syntax(talloc_tos(), &syntax),
                        get_friendly_nt_error_msg(status));
                return WERR_DEST_NOT_FOUND;
        }
index 0d1bc08ad30215a61cc41992f431ba02650cd123..7ec9f7939d15bd1d6b375cae45d8b14f4ff226d4 100644 (file)
@@ -35,7 +35,7 @@ WERROR NetFileClose_r(struct libnetapi_ctx *ctx,
        struct rpc_pipe_client *pipe_cli = NULL;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -129,7 +129,7 @@ WERROR NetFileGetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -195,7 +195,7 @@ WERROR NetFileEnum_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index d3f58f6684967f311b5f2a764627cff2ec393fde..848ccb8b625c160a4601387996fc6f0d3ab21e17 100644 (file)
@@ -45,7 +45,7 @@ WERROR NetGetDCName_r(struct libnetapi_ctx *ctx,
        WERROR werr;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_netlogon.syntax_id,
+                                  NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -85,7 +85,7 @@ WERROR NetGetAnyDCName_r(struct libnetapi_ctx *ctx,
        WERROR werr;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_netlogon.syntax_id,
+                                  NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -140,7 +140,7 @@ WERROR DsGetDcName_r(struct libnetapi_ctx *ctx,
        struct rpc_pipe_client *pipe_cli = NULL;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_netlogon.syntax_id,
+                                  NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index 77ed2e84854377e45c5d71ca08e077ba1d2bf044..0edf07bc4581d9b41442f795b3f2330adeef917f 100644 (file)
@@ -71,7 +71,7 @@ WERROR NetGroupAdd_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -242,7 +242,7 @@ WERROR NetGroupDel_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -407,7 +407,7 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -642,7 +642,7 @@ WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -758,7 +758,7 @@ WERROR NetGroupAddUser_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -879,7 +879,7 @@ WERROR NetGroupDelUser_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -1157,7 +1157,7 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -1288,7 +1288,7 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
 
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -1440,7 +1440,7 @@ WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index 9970a0655a383b8fc29dbb6b40cc2eaf6b67b7f1..c31b15d7fc6a8db6bdc62b1a16dcfe997052a378 100644 (file)
@@ -106,7 +106,7 @@ WERROR NetJoinDomain_r(struct libnetapi_ctx *ctx,
        unsigned int old_timeout = 0;
 
        werr = libnetapi_open_pipe(ctx, r->in.server,
-                                  &ndr_table_wkssvc.syntax_id,
+                                  NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -232,7 +232,7 @@ WERROR NetUnjoinDomain_r(struct libnetapi_ctx *ctx,
        unsigned int old_timeout = 0;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_wkssvc.syntax_id,
+                                  NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -278,7 +278,7 @@ WERROR NetGetJoinInformation_r(struct libnetapi_ctx *ctx,
        const char *buffer = NULL;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_wkssvc.syntax_id,
+                                  NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -408,7 +408,7 @@ WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx,
        WERROR werr;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_wkssvc.syntax_id,
+                                  NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -450,7 +450,7 @@ WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx *ctx,
        WERROR werr;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_wkssvc.syntax_id,
+                                  NDR_WKSSVC_UUID, NDR_WKSSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index d389c1f4a2b44aa6ea5227e2ff6a50a78475e7c7..4a9d5cdeec4b2a696f721799590760864b160d94 100644 (file)
@@ -150,7 +150,7 @@ WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx,
        ZERO_STRUCT(alias_handle);
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -270,7 +270,7 @@ WERROR NetLocalGroupDel_r(struct libnetapi_ctx *ctx,
        ZERO_STRUCT(alias_handle);
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -442,7 +442,7 @@ WERROR NetLocalGroupGetInfo_r(struct libnetapi_ctx *ctx,
        ZERO_STRUCT(alias_handle);
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -613,7 +613,7 @@ WERROR NetLocalGroupSetInfo_r(struct libnetapi_ctx *ctx,
        ZERO_STRUCT(alias_handle);
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -755,7 +755,7 @@ WERROR NetLocalGroupEnum_r(struct libnetapi_ctx *ctx,
        ZERO_STRUCT(alias_handle);
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -1042,7 +1042,7 @@ static WERROR NetLocalGroupModifyMembers_r(struct libnetapi_ctx *ctx,
 
        if (r->in.level == 3) {
                werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                          &ndr_table_lsarpc.syntax_id,
+                                          NDR_LSARPC_UUID, NDR_LSARPC_VERSION,
                                           &lsa_pipe);
                if (!W_ERROR_IS_OK(werr)) {
                        goto done;
@@ -1061,7 +1061,7 @@ static WERROR NetLocalGroupModifyMembers_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index effe2eb9a076715caf1eb24529243bb2b34873ad..1dcf7bf9342e52e4b10b590a90a8685786b14480 100644 (file)
@@ -53,7 +53,7 @@ NET_API_STATUS libnetapi_get_debuglevel(struct libnetapi_ctx *ctx, char **debugl
 WERROR libnetapi_shutdown_cm(struct libnetapi_ctx *ctx);
 WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
                           const char *server_name,
-                          const struct ndr_syntax_id *interface,
+                          const char *interface, uint32_t interface_version,
                           struct rpc_pipe_client **presult);
 WERROR libnetapi_samr_open_domain(struct libnetapi_ctx *mem_ctx,
                                  struct rpc_pipe_client *pipe_cli,
index 082938cadc4e23ac8506e0a6999da9aa279a121c..4f421eafb373e992346d47e5ffe823caa6bce4e5 100644 (file)
@@ -129,7 +129,7 @@ WERROR I_NetLogonControl_r(struct libnetapi_ctx *ctx,
        union netr_CONTROL_QUERY_INFORMATION query;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_netlogon.syntax_id,
+                                  NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -183,7 +183,7 @@ WERROR I_NetLogonControl2_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_netlogon.syntax_id,
+                                  NDR_NETLOGON_UUID, NDR_NETLOGON_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index cc2ff52ab5e698cadd323009d394fbf4c8b1fd0b..9109f446bb93bf80e27b0e05035283a2dc7b28e3 100644 (file)
@@ -501,7 +501,7 @@ WERROR NetServerGetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -598,7 +598,7 @@ WERROR NetServerSetInfo_r(struct libnetapi_ctx *ctx,
        union srvsvc_NetSrvInfo info;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -640,7 +640,7 @@ WERROR NetRemoteTOD_r(struct libnetapi_ctx *ctx,
        struct srvsvc_NetRemoteTODInfo *info = NULL;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index 84c275248da6424dfb2cb0a2fcd1bc70aa348192..342406efc87742bd095a4dc441e5a5e7cecee6c1 100644 (file)
@@ -199,7 +199,7 @@ WERROR NetShareAdd_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -252,7 +252,7 @@ WERROR NetShareDel_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -315,7 +315,7 @@ WERROR NetShareEnum_r(struct libnetapi_ctx *ctx,
        ZERO_STRUCT(info_ctr);
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -416,7 +416,7 @@ WERROR NetShareGetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -486,7 +486,7 @@ WERROR NetShareSetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_srvsvc.syntax_id,
+                                  NDR_SRVSVC_UUID, NDR_SRVSVC_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index f9eb93b125929103e441b3b82c880f7db6902f86..aee253a3a42eb7b9790a3b3a26b040cfaffa4332 100644 (file)
@@ -36,7 +36,8 @@ WERROR NetShutdownInit_r(struct libnetapi_ctx *ctx,
        struct lsa_StringLarge message;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_initshutdown.syntax_id,
+                                  NDR_INITSHUTDOWN_UUID,
+                                  NDR_INITSHUTDOWN_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -80,7 +81,8 @@ WERROR NetShutdownAbort_r(struct libnetapi_ctx *ctx,
        struct rpc_pipe_client *pipe_cli = NULL;
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_initshutdown.syntax_id,
+                                  NDR_INITSHUTDOWN_UUID,
+                                  NDR_INITSHUTDOWN_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index f95750fae7bd35d4d5fce79a0be998c22caae7f6..2b2c0b132b69e2ff221141fb570bc8f92dd112de 100644 (file)
@@ -381,7 +381,7 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -508,7 +508,7 @@ WERROR NetUserDel_r(struct libnetapi_ctx *ctx,
        ZERO_STRUCT(user_handle);
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
 
        if (!W_ERROR_IS_OK(werr)) {
@@ -1215,7 +1215,7 @@ WERROR NetUserEnum_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -1514,7 +1514,7 @@ WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -1640,7 +1640,7 @@ WERROR NetUserGetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -1794,7 +1794,7 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -2214,7 +2214,7 @@ WERROR NetUserModalsGet_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -2692,7 +2692,7 @@ WERROR NetUserModalsSet_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -2825,7 +2825,7 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -2976,7 +2976,7 @@ WERROR NetUserSetGroups_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -3258,7 +3258,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_open_pipe(ctx, r->in.server_name,
-                                  &ndr_table_samr.syntax_id,
+                                  NDR_SAMR_UUID, NDR_SAMR_VERSION,
                                   &pipe_cli);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;