From: Andrew Tridgell Date: Thu, 30 Sep 2010 19:43:14 +0000 (-0700) Subject: s4-libnet: wipe the old keytab when exporting X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=87f67d336919172845f53067c67d1eab8e7ef18a;p=mat%2Fsamba.git s4-libnet: wipe the old keytab when exporting this prevents confusion with old keytab entries Pair-Programmed-With: Andrew Bartlett --- 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,