diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-09-30 12:43:14 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-09-30 14:36:11 -0700 |
commit | 87f67d336919172845f53067c67d1eab8e7ef18a (patch) | |
tree | 74b9359584ae25556e4528316ee2e6196e2534f4 | |
parent | 57f67701a694b03f7c227c0f58729bf6d3733bbc (diff) | |
download | samba-87f67d336919172845f53067c67d1eab8e7ef18a.tar.gz samba-87f67d336919172845f53067c67d1eab8e7ef18a.tar.bz2 samba-87f67d336919172845f53067c67d1eab8e7ef18a.zip |
s4-libnet: wipe the old keytab when exporting
this prevents confusion with old keytab entries
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/libnet/libnet_export_keytab.c | 2 |
1 files changed, 2 insertions, 0 deletions
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, |