diff options
author | Günther Deschner <gd@samba.org> | 2008-11-18 13:25:50 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-11-18 16:03:05 +0100 |
commit | 9f86dd715a3d79d17c9366293f0dccdf95cc31ba (patch) | |
tree | 15505d6c892e546f9d3b4ce3e79cc3160824552a | |
parent | 4be8d9cca011cc090e19b2b43b59455d7e6a4b89 (diff) | |
download | samba-9f86dd715a3d79d17c9366293f0dccdf95cc31ba.tar.gz samba-9f86dd715a3d79d17c9366293f0dccdf95cc31ba.tar.bz2 samba-9f86dd715a3d79d17c9366293f0dccdf95cc31ba.zip |
s3-net: add "net rpc vampire passdb" that allows to take arguments.
Guenther
-rw-r--r-- | source3/utils/net_proto.h | 1 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 8 | ||||
-rw-r--r-- | source3/utils/net_rpc_samsync.c | 13 |
3 files changed, 22 insertions, 0 deletions
diff --git a/source3/utils/net_proto.h b/source3/utils/net_proto.h index 128f88b0d3..c058a0166f 100644 --- a/source3/utils/net_proto.h +++ b/source3/utils/net_proto.h @@ -359,6 +359,7 @@ NTSTATUS rpc_vampire_internals(struct net_context *c, TALLOC_CTX *mem_ctx, int argc, const char **argv); +int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv); int rpc_vampire_ldif(struct net_context *c, int argc, const char **argv); NTSTATUS rpc_vampire_ldif_internals(struct net_context *c, const DOM_SID *domain_sid, diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 10f2a324a3..8c79cea021 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -6370,6 +6370,14 @@ static int rpc_vampire(struct net_context *c, int argc, const char **argv) "net rpc vampire keytab\n" " Dump remote SAM database to Kerberos keytab file" }, + { + "passdb", + rpc_vampire_passdb, + NET_TRANSPORT_RPC, + "Dump remote SAM database to passdb", + "net rpc vampire passdb\n" + " Dump remote SAM database to passdb" + }, {NULL, NULL, 0, NULL, NULL} }; diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c index 22c6d25402..3b97718634 100644 --- a/source3/utils/net_rpc_samsync.c +++ b/source3/utils/net_rpc_samsync.c @@ -248,6 +248,19 @@ NTSTATUS rpc_vampire_internals(struct net_context *c, return result; } +int rpc_vampire_passdb(struct net_context *c, int argc, const char **argv) +{ + if (c->display_usage) { + d_printf("Usage:\n" + "net rpc vampire passdb\n" + " Dump remote SAM database to passdb\n"); + return 0; + } + + return run_rpc_command(c, NULL, &ndr_table_netlogon.syntax_id, 0, + rpc_vampire_internals, argc, argv); +} + NTSTATUS rpc_vampire_ldif_internals(struct net_context *c, const DOM_SID *domain_sid, const char *domain_name, |