net: move the "net idmap set" functionality to subcommand "net idmap set mapping"
authorMichael Adam <obnox@samba.org>
Fri, 6 Sep 2013 16:01:20 +0000 (18:01 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 1 Oct 2013 08:49:21 +0000 (10:49 +0200)
This is in preparation of adding more "net idmap set" subcommands for the autorid backend.

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

index 6f2efec87b43fd6cc525bfe49ac575acc520aaab..93a68d26b7f3fcec7cfa4ebfd70ce4a008923d91 100644 (file)
@@ -570,7 +570,8 @@ done:
        return ret;
 }
 
-static int net_idmap_set(struct net_context *c, int argc, const char **argv)
+static int net_idmap_set_mapping(struct net_context *c,
+                                int argc, const char **argv)
 {
        d_printf("%s\n", _("Not implemented yet"));
        return -1;
@@ -665,6 +666,23 @@ static int net_idmap_secret(struct net_context *c, int argc, const char **argv)
        return 0;
 }
 
+static int net_idmap_set(struct net_context *c, int argc, const char **argv)
+{
+       struct functable func[] = {
+               {
+                       "mapping",
+                       net_idmap_set_mapping,
+                       NET_TRANSPORT_LOCAL,
+                       N_("Not implemented yet"),
+                       N_("net idmap set mapping\n"
+                          "  Not implemented yet")
+               },
+               {NULL, NULL, 0, NULL, NULL}
+       };
+
+       return net_run_function(c, argc, argv, "net idmap set", func);
+}
+
 static int net_idmap_check(struct net_context *c, int argc, const char **argv)
 {
        const char* dbfile;
@@ -737,9 +755,9 @@ int net_idmap(struct net_context *c, int argc, const char **argv)
                        "set",
                        net_idmap_set,
                        NET_TRANSPORT_LOCAL,
-                       N_("Not implemented yet"),
+                       N_("Write data to the ID mapping database"),
                        N_("net idmap set\n"
-                          "  Not implemented yet")
+                          "  Write data to the ID mapping database")
                },
                {
                        "delete",