summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2013-05-17 16:10:13 +0200
committerAndreas Schneider <asn@samba.org>2013-08-05 10:29:59 +0200
commit77f7f2a976e5b95f3bd9f542b92926adee4f5fa6 (patch)
tree3bdbf7fb9d3744b2ad49edc2715ad3ad62181628
parentfa37bbd9d06865d265bf554a3c49920f956f2185 (diff)
downloadsamba-77f7f2a976e5b95f3bd9f542b92926adee4f5fa6.tar.gz
samba-77f7f2a976e5b95f3bd9f542b92926adee4f5fa6.tar.bz2
samba-77f7f2a976e5b95f3bd9f542b92926adee4f5fa6.zip
s3-libnetapi: pass down ndr_interface_table to libnetapi_open_pipe().
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--source3/lib/netapi/cm.c8
-rw-r--r--source3/lib/netapi/group.c18
-rw-r--r--source3/lib/netapi/joindomain.c10
-rw-r--r--source3/lib/netapi/localgroup.c14
-rw-r--r--source3/lib/netapi/netapi_private.h2
-rw-r--r--source3/lib/netapi/user.c22
6 files changed, 37 insertions, 37 deletions
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c
index 786fd94957..310b6d2026 100644
--- a/source3/lib/netapi/cm.c
+++ b/source3/lib/netapi/cm.c
@@ -234,7 +234,7 @@ 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 struct ndr_interface_table *table,
struct rpc_pipe_client **presult)
{
struct rpc_pipe_client *result = NULL;
@@ -251,10 +251,10 @@ WERROR libnetapi_open_pipe(struct libnetapi_ctx *ctx,
return werr;
}
- status = pipe_cm_open(ctx, ipc, interface, &result);
+ status = pipe_cm_open(ctx, ipc, &table->syntax_id, &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(), &table->syntax_id),
get_friendly_nt_error_msg(status));
return WERR_DEST_NOT_FOUND;
}
@@ -277,7 +277,7 @@ WERROR libnetapi_get_binding_handle(struct libnetapi_ctx *ctx,
*binding_handle = NULL;
- result = libnetapi_open_pipe(ctx, server_name, &table->syntax_id, &pipe_cli);
+ result = libnetapi_open_pipe(ctx, server_name, table, &pipe_cli);
if (!W_ERROR_IS_OK(result)) {
return result;
}
diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index 9813f7eacb..38ed6df84d 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -76,7 +76,7 @@ WERROR NetGroupAdd_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -272,7 +272,7 @@ WERROR NetGroupDel_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -475,7 +475,7 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -745,7 +745,7 @@ WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -885,7 +885,7 @@ WERROR NetGroupAddUser_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1029,7 +1029,7 @@ WERROR NetGroupDelUser_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1332,7 +1332,7 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1479,7 +1479,7 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1655,7 +1655,7 @@ WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c
index b6fb57ae02..d8e624fde5 100644
--- a/source3/lib/netapi/joindomain.c
+++ b/source3/lib/netapi/joindomain.c
@@ -116,7 +116,7 @@ WERROR NetJoinDomain_r(struct libnetapi_ctx *ctx,
DATA_BLOB session_key;
werr = libnetapi_open_pipe(ctx, r->in.server,
- &ndr_table_wkssvc.syntax_id,
+ &ndr_table_wkssvc,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -257,7 +257,7 @@ WERROR NetUnjoinDomain_r(struct libnetapi_ctx *ctx,
DATA_BLOB session_key;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_wkssvc.syntax_id,
+ &ndr_table_wkssvc,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -313,7 +313,7 @@ WERROR NetGetJoinInformation_r(struct libnetapi_ctx *ctx,
struct dcerpc_binding_handle *b;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_wkssvc.syntax_id,
+ &ndr_table_wkssvc,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -455,7 +455,7 @@ WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx,
DATA_BLOB session_key;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_wkssvc.syntax_id,
+ &ndr_table_wkssvc,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -508,7 +508,7 @@ WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx *ctx,
DATA_BLOB session_key;
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_wkssvc.syntax_id,
+ &ndr_table_wkssvc,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c
index 1a544adecd..6501eddcc6 100644
--- a/source3/lib/netapi/localgroup.c
+++ b/source3/lib/netapi/localgroup.c
@@ -179,7 +179,7 @@ WERROR NetLocalGroupAdd_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -313,7 +313,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_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -493,7 +493,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_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -672,7 +672,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_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -822,7 +822,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_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1135,7 +1135,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_table_lsarpc,
&lsa_pipe);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1154,7 +1154,7 @@ static WERROR NetLocalGroupModifyMembers_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
diff --git a/source3/lib/netapi/netapi_private.h b/source3/lib/netapi/netapi_private.h
index 62aa7ef55e..897cf3d0b3 100644
--- a/source3/lib/netapi/netapi_private.h
+++ b/source3/lib/netapi/netapi_private.h
@@ -61,7 +61,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 struct ndr_interface_table *table,
struct rpc_pipe_client **presult);
WERROR libnetapi_get_binding_handle(struct libnetapi_ctx *ctx,
const char *server_name,
diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c
index df3914cb4f..a2d6c79789 100644
--- a/source3/lib/netapi/user.c
+++ b/source3/lib/netapi/user.c
@@ -400,7 +400,7 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -552,7 +552,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_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
@@ -1314,7 +1314,7 @@ WERROR NetUserEnum_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1622,7 +1622,7 @@ WERROR NetQueryDisplayInformation_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1756,7 +1756,7 @@ WERROR NetUserGetInfo_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1920,7 +1920,7 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -2371,7 +2371,7 @@ WERROR NetUserModalsGet_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -2856,7 +2856,7 @@ WERROR NetUserModalsSet_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -2991,7 +2991,7 @@ WERROR NetUserGetGroups_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -3166,7 +3166,7 @@ WERROR NetUserSetGroups_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -3491,7 +3491,7 @@ WERROR NetUserGetLocalGroups_r(struct libnetapi_ctx *ctx,
}
werr = libnetapi_open_pipe(ctx, r->in.server_name,
- &ndr_table_samr.syntax_id,
+ &ndr_table_samr,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;