diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-08 12:31:38 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-08 13:12:16 +0100 |
commit | 5fc9d93408effe75abcd231c45cbc14656692ebe (patch) | |
tree | 03de463e98efebfc0b3f290abc1202fd6ff3ae7d /source3/lib/netapi/cm.c | |
parent | 53f2a1595e76db9fe1b42db65b51895b73365993 (diff) | |
download | samba-5fc9d93408effe75abcd231c45cbc14656692ebe.tar.gz samba-5fc9d93408effe75abcd231c45cbc14656692ebe.tar.bz2 samba-5fc9d93408effe75abcd231c45cbc14656692ebe.zip |
s3: Make libnetapi_open_pipe take strings instead of a ndr_interface_table
Diffstat (limited to 'source3/lib/netapi/cm.c')
-rw-r--r-- | source3/lib/netapi/cm.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c index 9baba7b824..813827d4dd 100644 --- a/source3/lib/netapi/cm.c +++ b/source3/lib/netapi/cm.c @@ -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; } |