r5827: Make ndrdump accept a uuid as well as a pipe name to specify
authorTim Potter <tpot@samba.org>
Wed, 16 Mar 2005 06:18:20 +0000 (06:18 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:11:04 +0000 (13:11 -0500)
which rpc interface to use.

source/utils/ndrdump.c

index 48b1a3ef61161ace2d5b9fc2e08aab9d9e979427..bcfbb45e60b65939f1d1662c9f41bb124df9ebde 100644 (file)
@@ -127,7 +127,8 @@ static char *stdin_load(TALLOC_CTX *mem_ctx, size_t *size)
 
        pc = poptGetContext("ndrdump", argc, argv, long_options, 0);
        
-       poptSetOtherOptionHelp(pc, "<pipe> <function> <inout> [<filename>]");
+       poptSetOtherOptionHelp(
+               pc, "<pipe|uuid> <function> <inout> [<filename>]");
 
        while ((opt = poptGetNextOpt(pc)) != -1) {
        }
@@ -143,8 +144,13 @@ static char *stdin_load(TALLOC_CTX *mem_ctx, size_t *size)
        p = idl_iface_by_name(pipe_name);
 
        if (!p) {
-               printf("Unknown pipe '%s'\n", pipe_name);
-               exit(1);
+
+               p = idl_iface_by_uuid(pipe_name);
+
+               if (!p) {
+                       printf("Unknown pipe or UUID '%s'\n", pipe_name);
+                       exit(1);
+               }
        }
 
        function = poptGetArg(pc);