rpcclient: Make netfileenum cmd print the path names
authorVolker Lendecke <vl@samba.org>
Mon, 11 May 2020 09:09:02 +0000 (11:09 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 14 May 2020 20:29:38 +0000 (20:29 +0000)
Needed for the next commit testing netfileenum

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14355

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/rpcclient/cmd_srvsvc.c

index a9de4608fb9b5699ccedd846ae11de1233446856..478afc68cd147b5428cd759329df687aff50f861 100644 (file)
@@ -684,6 +684,14 @@ static WERROR cmd_srvsvc_net_file_enum(struct rpc_pipe_client *cli,
                goto done;
        }
 
+       if (info_ctr.level == 3) {
+               struct srvsvc_NetFileCtr3 *ret = info_ctr.ctr.ctr3;
+               uint32_t i;
+
+               for (i=0; i<ret->count; i++) {
+                       printf("%s\n", ret->array[i].path);
+               }
+       }
  done:
        return result;
 }