summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2015-06-11 13:55:15 -0700
committerVolker Lendecke <vl@samba.org>2015-06-12 09:47:19 +0200
commitb0ccfa0c3888d9d0796bbcc05b6a89f8f6202bb3 (patch)
tree16506c03cd0f0d813eb65ac7247b36f39530dc31
parenta90beeb6a6f98fd484aae8e6676e78e45cc34fe1 (diff)
downloadsamba-b0ccfa0c3888d9d0796bbcc05b6a89f8f6202bb3.tar.gz
rpcclient: Add info level 1005 for netsharegetinfo
This allows querying the DFS flags and the csc policy. Also update the usage info that ths share name is not optional and print the supported info levels. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
-rw-r--r--source3/rpcclient/cmd_srvsvc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c
index 2688eb6597a..97aef39d025 100644
--- a/source3/rpcclient/cmd_srvsvc.c
+++ b/source3/rpcclient/cmd_srvsvc.c
@@ -253,6 +253,14 @@ static void display_share_info_502(struct srvsvc_NetShareInfo502 *r)
}
+static void display_share_info_1005(struct srvsvc_NetShareInfo1005 *r)
+{
+ printf("flags: 0x%x\n", r->dfs_flags);
+ printf("csc caching: %u\n",
+ (r->dfs_flags & SHARE_1005_CSC_POLICY_MASK) >>
+ SHARE_1005_CSC_POLICY_SHIFT);
+}
+
static WERROR cmd_srvsvc_net_share_enum_int(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
int argc, const char **argv,
@@ -427,7 +435,8 @@ static WERROR cmd_srvsvc_net_share_get_info(struct rpc_pipe_client *cli,
struct dcerpc_binding_handle *b = cli->binding_handle;
if (argc < 2 || argc > 3) {
- printf("Usage: %s [sharename] [infolevel]\n", argv[0]);
+ printf("Usage: %s sharename [infolevel 1|2|502|1005]\n",
+ argv[0]);
return WERR_OK;
}
@@ -461,6 +470,9 @@ static WERROR cmd_srvsvc_net_share_get_info(struct rpc_pipe_client *cli,
case 502:
display_share_info_502(info.info502);
break;
+ case 1005:
+ display_share_info_1005(info.info1005);
+ break;
default:
printf("unsupported info level %d\n", info_level);
break;