From 062b0ebc04406a24c804ffe1d3a95eb0b4500199 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 23 Sep 2010 16:54:06 +1000 Subject: s4-libnet Remove libnet_samdump_keytab() and net samdump keytab There is a beter implementation of this in Samba3, and this uses functions in the credentials code that I want to remove. The same functionality is available by running 'net samsync' and 'net export keytab'. This isn't a DRS-backed utility, it only used netlogon replication. Andrew Bartlett --- source4/utils/net/net_vampire.c | 52 ----------------------------------------- 1 file changed, 52 deletions(-) (limited to 'source4/utils') diff --git a/source4/utils/net/net_vampire.c b/source4/utils/net/net_vampire.c index f1f0f9db65..c113ad7001 100644 --- a/source4/utils/net/net_vampire.c +++ b/source4/utils/net/net_vampire.c @@ -28,59 +28,8 @@ #include "param/param.h" #include "lib/events/events.h" -static int net_samdump_keytab_usage(struct net_context *ctx, int argc, const char **argv) -{ - d_printf("net samdump keytab \n"); - return 0; -} - -static int net_samdump_keytab_help(struct net_context *ctx, int argc, const char **argv) -{ - d_printf("Dumps kerberos keys of a domain into a keytab.\n"); - return 0; -} - -static int net_samdump_keytab(struct net_context *ctx, int argc, const char **argv) -{ - NTSTATUS status; - struct libnet_context *libnetctx; - struct libnet_SamDump_keytab r; - - switch (argc) { - case 0: - return net_samdump_keytab_usage(ctx, argc, argv); - break; - case 1: - r.in.keytab_name = argv[0]; - break; - } - - libnetctx = libnet_context_init(ctx->event_ctx, ctx->lp_ctx); - if (!libnetctx) { - return -1; - } - libnetctx->cred = ctx->credentials; - - r.out.error_string = NULL; - r.in.machine_account = NULL; - r.in.binding_string = NULL; - - status = libnet_SamDump_keytab(libnetctx, ctx, &r); - if (!NT_STATUS_IS_OK(status)) { - DEBUG(0,("libnet_SamDump returned %s: %s\n", - nt_errstr(status), - r.out.error_string)); - return -1; - } - - talloc_free(libnetctx); - - return 0; -} - /* main function table */ static const struct net_functable net_samdump_functable[] = { - {"keytab", "dump keys into a keytab\n", net_samdump_keytab, net_samdump_keytab_usage}, {NULL, NULL, NULL, NULL} }; @@ -127,7 +76,6 @@ int net_samdump(struct net_context *ctx, int argc, const char **argv) int net_samdump_usage(struct net_context *ctx, int argc, const char **argv) { d_printf("net samdump\n"); - d_printf("net samdump keytab \n"); return 0; } -- cgit v1.2.3