From 87f67d336919172845f53067c67d1eab8e7ef18a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 30 Sep 2010 12:43:14 -0700 Subject: s4-libnet: wipe the old keytab when exporting this prevents confusion with old keytab entries Pair-Programmed-With: Andrew Bartlett --- source4/libnet/libnet_export_keytab.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source4/libnet/libnet_export_keytab.c b/source4/libnet/libnet_export_keytab.c index f7ab88ffd3..e8a0a1321d 100644 --- a/source4/libnet/libnet_export_keytab.c +++ b/source4/libnet/libnet_export_keytab.c @@ -45,6 +45,8 @@ NTSTATUS libnet_export_keytab(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, s return NT_STATUS_NO_MEMORY; } + unlink(r->in.keytab_name); + 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, -- cgit