summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-12-03 13:12:26 +0100
committerGünther Deschner <gd@samba.org>2007-12-07 11:42:24 +0100
commit09c4b72a5730dc9c91d537632d3a9ca0a7c04c0b (patch)
tree7557ffa3077f83e607348236ffae33adf5742661
parent7bfe569b7d3cd0709c166ab484d600ff1e2ce580 (diff)
downloadsamba-09c4b72a5730dc9c91d537632d3a9ca0a7c04c0b.tar.gz
samba-09c4b72a5730dc9c91d537632d3a9ca0a7c04c0b.tar.bz2
samba-09c4b72a5730dc9c91d537632d3a9ca0a7c04c0b.zip
Add getjoininformation to rpcclient.
Guenther (This used to be commit 699f6b1bc332b1e2834f5c384440b2501838c43f)
-rw-r--r--source3/rpcclient/cmd_wkssvc.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/source3/rpcclient/cmd_wkssvc.c b/source3/rpcclient/cmd_wkssvc.c
index 5873f17813..b0c548f925 100644
--- a/source3/rpcclient/cmd_wkssvc.c
+++ b/source3/rpcclient/cmd_wkssvc.c
@@ -55,9 +55,35 @@ static WERROR cmd_wkssvc_wkstagetinfo(struct rpc_pipe_client *cli,
return werr;
}
+static WERROR cmd_wkssvc_getjoininformation(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ int argc,
+ const char **argv)
+{
+ const char *server_name;
+ const char *name_buffer;
+ enum wkssvc_NetJoinStatus name_type;
+ NTSTATUS status;
+
+ server_name = cli->cli->desthost;
+ name_buffer = "";
+
+ status = rpccli_wkssvc_NetrGetJoinInformation(cli, mem_ctx,
+ server_name, &name_buffer,
+ &name_type);
+ if (!NT_STATUS_IS_OK(status)) {
+ return ntstatus_to_werror(status);
+ }
+
+ printf("%s (%d)\n", name_buffer, name_type);
+
+ return WERR_OK;
+}
+
struct cmd_set wkssvc_commands[] = {
{ "WKSSVC" },
{ "wkstagetinfo", RPC_RTYPE_WERROR, NULL, cmd_wkssvc_wkstagetinfo, PI_WKSSVC, NULL, "Query WKSSVC Workstation Information", "" },
+ { "getjoininformation", RPC_RTYPE_WERROR, NULL, cmd_wkssvc_getjoininformation, PI_WKSSVC, NULL, "Query WKSSVC Join Information", "" },
{ NULL }
};