net: add "net idmap get" command
authorMichael Adam <obnox@samba.org>
Mon, 9 Sep 2013 23:53:14 +0000 (01:53 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 1 Oct 2013 08:49:23 +0000 (10:49 +0200)
This has no subcommands yet and is added in preparation of adding some.

Signed-off-by: Michael Adam <obnox@samba.org>
source3/utils/net_idmap.c

index b17e819300cb27adf77238efa0c6149fdc88b09b..e29792502aee2db6ddcadd03f934dc029d6e8388 100644 (file)
@@ -807,6 +807,15 @@ static int net_idmap_set(struct net_context *c, int argc, const char **argv)
        return net_run_function(c, argc, argv, "net idmap set", func);
 }
 
+static int net_idmap_get(struct net_context *c, int argc, const char **argv)
+{
+       struct functable func[] = {
+               {NULL, NULL, 0, NULL, NULL}
+       };
+
+       return net_run_function(c, argc, argv, "net idmap get", func);
+}
+
 static int net_idmap_check(struct net_context *c, int argc, const char **argv)
 {
        const char* dbfile;
@@ -875,6 +884,14 @@ int net_idmap(struct net_context *c, int argc, const char **argv)
                        N_("net idmap restore\n"
                           "  Restore entries from stdin")
                },
+               {
+                       "get",
+                       net_idmap_get,
+                       NET_TRANSPORT_LOCAL,
+                       N_("Read data from the ID mapping database"),
+                       N_("net idmap get\n"
+                          "  Read data from the ID mapping database")
+               },
                {
                        "set",
                        net_idmap_set,