diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-07-27 17:25:12 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-07-27 17:41:11 +0200 |
commit | b7c003c09c06ef5a23beb0928affaba75f65587c (patch) | |
tree | f92f13c0405f7d6d78200e372f39bda671bc923f /source4/libnet/libnet_export_keytab.c | |
parent | 3532882d02ff30c1ea47dd433715246351297e4e (diff) | |
download | samba-b7c003c09c06ef5a23beb0928affaba75f65587c.tar.gz samba-b7c003c09c06ef5a23beb0928affaba75f65587c.tar.bz2 samba-b7c003c09c06ef5a23beb0928affaba75f65587c.zip |
Revert "s4:kerberos Add 'net export keytab' command for wireshark decryption"
This reverts commit a40ce5d0d9d06f592a8885162bbaf644006b9f0f.
This breaks the build...
Andrew, please repush it, when it's fixed:-)
metze
Diffstat (limited to 'source4/libnet/libnet_export_keytab.c')
-rw-r--r-- | source4/libnet/libnet_export_keytab.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/source4/libnet/libnet_export_keytab.c b/source4/libnet/libnet_export_keytab.c deleted file mode 100644 index 43fd0aa30e..0000000000 --- a/source4/libnet/libnet_export_keytab.c +++ /dev/null @@ -1,54 +0,0 @@ -#include "includes.h" -#include "system/kerberos.h" -#include "auth/kerberos/kerberos.h" -#include <hdb.h> -#include "kdc/hdb-samba4.h" -#include "auth/kerberos/keytab_copy.h" -#include "libnet/libnet.h" - -NTSTATUS libnet_export_keytab(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, struct libnet_export_keytab *r) -{ - krb5_error_code ret; - struct smb_krb5_context *smb_krb5_context; - const char *from_keytab; - - /* Register hdb-samba4 hooks for use as a keytab */ - - struct hdb_samba4_context *hdb_samba4_context = talloc(mem_ctx, struct hdb_samba4_context); - if (!hdb_samba4_context) { - return NT_STATUS_NO_MEMORY; - } - - hdb_samba4_context->ev_ctx = ctx->event_ctx; - hdb_samba4_context->lp_ctx = ctx->lp_ctx; - - from_keytab = talloc_asprintf(hdb_samba4_context, "HDB:samba4&%p", hdb_samba4_context); - if (!from_keytab) { - return NT_STATUS_NO_MEMORY; - } - - ret = smb_krb5_init_context(ctx, ctx->event_ctx, ctx->lp_ctx, &smb_krb5_context); - if (ret) { - return NT_STATUS_NO_MEMORY; - } - - ret = krb5_plugin_register(smb_krb5_context->krb5_context, - PLUGIN_TYPE_DATA, "hdb", - &hdb_samba4); - if(ret) { - return NT_STATUS_NO_MEMORY; - } - - ret = krb5_kt_register(smb_krb5_context->krb5_context, &hdb_kt_ops); - if(ret) { - return NT_STATUS_NO_MEMORY; - } - - ret = kt_copy(smb_krb5_context->krb5_context, from_keytab, r->in.keytab_name); - if(ret) { - r->out.error_string = smb_get_krb5_error_message(smb_krb5_context->krb5_context, - ret, mem_ctx); - return NT_STATUS_UNSUCCESSFUL; - } - return NT_STATUS_OK; -} |