summaryrefslogtreecommitdiffstats
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-07 14:38:31 +0200
committerGünther Deschner <gd@samba.org>2010-04-07 14:41:13 +0200
commit95b9c48ef1fbe6c1566a86cadf3295b6c7e28319 (patch)
treed6ed55890eded5d74e3c9a2cf731ef2a7de24548 /source3/rpcclient
parentf63c345bbd2b069c1f946529d559e8c6dbd7f2bc (diff)
downloadsamba-95b9c48ef1fbe6c1566a86cadf3295b6c7e28319.tar.gz
samba-95b9c48ef1fbe6c1566a86cadf3295b6c7e28319.tar.xz
samba-95b9c48ef1fbe6c1566a86cadf3295b6c7e28319.zip
s3-rpcclient: allow to define server_unc in cmd_srvsvc_srv_query_info().
Guenther
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_srvsvc.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index 866b68111d..890151e2b4 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -173,17 +173,23 @@ static WERROR cmd_srvsvc_srv_query_info(struct rpc_pipe_client *cli,
union srvsvc_NetSrvInfo info;
WERROR result;
NTSTATUS status;
+ const char *server_unc = cli->srv_name_slash;
- if (argc > 2) {
- printf("Usage: %s [infolevel]\n", argv[0]);
+ if (argc > 3) {
+ printf("Usage: %s [infolevel] [server_unc]\n", argv[0]);
return WERR_OK;
}
- if (argc == 2)
+ if (argc >= 2) {
info_level = atoi(argv[1]);
+ }
+
+ if (argc >= 3) {
+ server_unc = argv[2];
+ }
status = rpccli_srvsvc_NetSrvGetInfo(cli, mem_ctx,
- cli->srv_name_slash,
+ server_unc,
info_level,
&info,
&result);