s3-libnetapi: pass down ndr_interface_table to libnetapi_get_binding_handle().
authorGünther Deschner <gd@samba.org>
Fri, 17 May 2013 14:08:16 +0000 (16:08 +0200)
committerAndreas Schneider <asn@samba.org>
Mon, 5 Aug 2013 08:29:59 +0000 (10:29 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/lib/netapi/cm.c
source3/lib/netapi/file.c
source3/lib/netapi/getdc.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

index 36e8731fa9f5c166b65daf8480db60a3701f3517..786fd949571d7cae117bb42a4ea62f82e1c4af64 100644 (file)
@@ -269,7 +269,7 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
 
 WERROR libnetapi_get_binding_handle(struct libnetapi_ctx *ctx,
                                    const char *server_name,
-                                   const struct ndr_syntax_id *interface,
+                                   const struct ndr_interface_table *table,
                                    struct dcerpc_binding_handle **binding_handle)
 {
        struct rpc_pipe_client *pipe_cli;
@@ -277,7 +277,7 @@ WERROR libnetapi_get_binding_handle(struct libnetapi_ctx *ctx,
 
        *binding_handle = NULL;
 
-       result = libnetapi_open_pipe(ctx, server_name, interface, &pipe_cli);
+       result = libnetapi_open_pipe(ctx, server_name, &table->syntax_id, &pipe_cli);
        if (!W_ERROR_IS_OK(result)) {
                return result;
        }
index 1e406d28848293fd733701c5412eac42d95ef2aa..551f9ff4f0e090869afad8a181992ed2747b0541 100644 (file)
@@ -36,7 +36,7 @@ WERROR NetFileClose_r(struct libnetapi_ctx *ctx,
        struct dcerpc_binding_handle *b;
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -130,7 +130,7 @@ WERROR NetFileGetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -201,7 +201,7 @@ WERROR NetFileEnum_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index 3b26d46db47e11f6f318bc513512775528f3ffd9..ae976f1f02d3febfd71ba5a630ac7ec6d52c1552 100644 (file)
@@ -47,7 +47,7 @@ WERROR NetGetDCName_r(struct libnetapi_ctx *ctx,
        void *buffer;
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_netlogon.syntax_id,
+                                           &ndr_table_netlogon,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -101,7 +101,7 @@ WERROR NetGetAnyDCName_r(struct libnetapi_ctx *ctx,
        void *buffer;
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_netlogon.syntax_id,
+                                           &ndr_table_netlogon,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -173,7 +173,7 @@ WERROR DsGetDcName_r(struct libnetapi_ctx *ctx,
        struct dcerpc_binding_handle *b;
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_netlogon.syntax_id,
+                                           &ndr_table_netlogon,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index 349287b9e9676f565fd4585bcca63b9bdf106234..62aa7ef55e1453aa06163b2d3b480466c17a42b2 100644 (file)
@@ -30,6 +30,7 @@
        return fn ## _r(ctx, r);
 
 struct dcerpc_binding_handle;
+struct ndr_interface_table;
 
 struct libnetapi_private_ctx {
        struct {
@@ -64,7 +65,7 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
                           struct rpc_pipe_client **presult);
 WERROR libnetapi_get_binding_handle(struct libnetapi_ctx *ctx,
                                    const char *server_name,
-                                   const struct ndr_syntax_id *interface,
+                                   const struct ndr_interface_table *table,
                                    struct dcerpc_binding_handle **binding_handle);
 WERROR libnetapi_samr_open_domain(struct libnetapi_ctx *mem_ctx,
                                  struct rpc_pipe_client *pipe_cli,
index a046fb77e91db821b49cfd37f93120cefa80ebee..136cb4888448203b5833850e485a122002aecd87 100644 (file)
@@ -133,7 +133,7 @@ WERROR I_NetLogonControl_r(struct libnetapi_ctx *ctx,
        struct dcerpc_binding_handle *b;
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_netlogon.syntax_id,
+                                           &ndr_table_netlogon,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -190,7 +190,7 @@ WERROR I_NetLogonControl2_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_netlogon.syntax_id,
+                                           &ndr_table_netlogon,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index 046b693f1f1ce53069f3dc0fc0607ea1c4b99db9..b2a84d11a5fbc3d287d0d04e4b47b7275be01aa4 100644 (file)
@@ -503,7 +503,7 @@ WERROR NetServerGetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -616,7 +616,7 @@ WERROR NetServerSetInfo_r(struct libnetapi_ctx *ctx,
        struct dcerpc_binding_handle *b;
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -658,7 +658,7 @@ WERROR NetRemoteTOD_r(struct libnetapi_ctx *ctx,
        struct dcerpc_binding_handle *b;
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index d12fa1cf0c06d8a1858690a70833f377b28996ae..090e1a99396a243525bc780a4ab4c30ed8d0034c 100644 (file)
@@ -200,7 +200,7 @@ WERROR NetShareAdd_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -258,7 +258,7 @@ WERROR NetShareDel_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -321,7 +321,7 @@ WERROR NetShareEnum_r(struct libnetapi_ctx *ctx,
        ZERO_STRUCT(info_ctr);
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -428,7 +428,7 @@ WERROR NetShareGetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -502,7 +502,7 @@ WERROR NetShareSetInfo_r(struct libnetapi_ctx *ctx,
        }
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_srvsvc.syntax_id,
+                                           &ndr_table_srvsvc,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
index 78bc2fce6b9ac47d287bda32931aaa43b576d5d6..9e1e8e13cf6877948cd424f7948b23dea6b20601 100644 (file)
@@ -38,7 +38,7 @@ WERROR NetShutdownInit_r(struct libnetapi_ctx *ctx,
        struct dcerpc_binding_handle *b;
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_initshutdown.syntax_id,
+                                           &ndr_table_initshutdown,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;
@@ -82,7 +82,7 @@ WERROR NetShutdownAbort_r(struct libnetapi_ctx *ctx,
        struct dcerpc_binding_handle *b;
 
        werr = libnetapi_get_binding_handle(ctx, r->in.server_name,
-                                           &ndr_table_initshutdown.syntax_id,
+                                           &ndr_table_initshutdown,
                                            &b);
        if (!W_ERROR_IS_OK(werr)) {
                goto done;