diff options
author | Michael Adam <obnox@samba.org> | 2013-09-09 17:30:32 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-10-02 00:06:30 +0200 |
commit | 29a94b0e1b9f7bb5824df5d66337a6b26a86a343 (patch) | |
tree | 02bbb9ce903dbd9942060ab01484778e3cd65ec2 /source3/utils | |
parent | 68c4414fa5200914cba726f964dbe4f2e6407fff (diff) | |
download | samba-29a94b0e1b9f7bb5824df5d66337a6b26a86a343.tar.gz samba-29a94b0e1b9f7bb5824df5d66337a6b26a86a343.tar.bz2 samba-29a94b0e1b9f7bb5824df5d66337a6b26a86a343.zip |
net: move the "net idmap delete" functionality to subcommand "net idmap delete mapping"
This is in preparation of adding more types of entries to delete...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_idmap.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/source3/utils/net_idmap.c b/source3/utils/net_idmap.c index db7587aab4..306b130f6e 100644 --- a/source3/utils/net_idmap.c +++ b/source3/utils/net_idmap.c @@ -516,7 +516,8 @@ static bool delete_args_ok(int argc, const char **argv) return false; } -static int net_idmap_delete(struct net_context *c, int argc, const char **argv) +static int net_idmap_delete_mapping(struct net_context *c, int argc, + const char **argv) { int ret = -1; struct db_context *db; @@ -529,7 +530,7 @@ static int net_idmap_delete(struct net_context *c, int argc, const char **argv) if ( !delete_args_ok(argc,argv) || c->display_usage) { d_printf("%s\n%s", _("Usage:"), - _("net idmap delete [-f] [--db=<TDB>] <ID>\n" + _("net idmap delete mapping [-f] [--db=<TDB>] <ID>\n" " Delete mapping of ID from TDB.\n" " -f\tforce\n" " TDB\tidmap database\n" @@ -570,6 +571,24 @@ done: return ret; } +static int net_idmap_delete(struct net_context *c, int argc, const char **argv) +{ + struct functable func[] = { + { + "mapping", + net_idmap_delete_mapping, + NET_TRANSPORT_LOCAL, + N_("Delete ID mapping"), + N_("net idmap delete mapping <ID>\n" + " Delete ID mapping") + }, + {NULL, NULL, 0, NULL, NULL} + }; + + return net_run_function(c, argc, argv, "net idmap delete", func); +} + + static int net_idmap_set_mapping(struct net_context *c, int argc, const char **argv) { @@ -771,9 +790,9 @@ int net_idmap(struct net_context *c, int argc, const char **argv) "delete", net_idmap_delete, NET_TRANSPORT_LOCAL, - N_("Delete ID mapping"), - N_("net idmap delete <ID>\n" - " Delete ID mapping") + N_("Delete entries from the ID mapping database"), + N_("net idmap delete\n" + " Delete entries from the ID mapping database") }, { "secret", |