diff options
author | Michael Adam <obnox@samba.org> | 2008-07-29 18:05:13 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-08-01 16:04:43 +0200 |
commit | f6bc42d80c2e9350ca5ccf46887267d6509a2c76 (patch) | |
tree | 7e1dff8910f0f86744225763caf7108f89763101 /source3/libnet/libnet_dssync_keytab.c | |
parent | a6e5a5d71440ff6b66d49abb92200ef30dda9790 (diff) | |
download | samba-f6bc42d80c2e9350ca5ccf46887267d6509a2c76.tar.gz samba-f6bc42d80c2e9350ca5ccf46887267d6509a2c76.tar.bz2 samba-f6bc42d80c2e9350ca5ccf46887267d6509a2c76.zip |
dssync keytab: move handling of removal of duplicates to libnet_keytab_add_entry().
This makes libnet_keytab_remove_entries static and moves it up.
libnet_keytab_add_entry() now removes the duplicates in advance.
No special handling neede for the UTDV - this is also needed
for other entries...
Michael
(This used to be commit 3c463745445f6b64017918f442bf1021be219e83)
Diffstat (limited to 'source3/libnet/libnet_dssync_keytab.c')
-rw-r--r-- | source3/libnet/libnet_dssync_keytab.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/source3/libnet/libnet_dssync_keytab.c b/source3/libnet/libnet_dssync_keytab.c index 03d5bf2348..4bd4a79a00 100644 --- a/source3/libnet/libnet_dssync_keytab.c +++ b/source3/libnet/libnet_dssync_keytab.c @@ -113,7 +113,6 @@ static NTSTATUS keytab_finish(struct dssync_context *ctx, TALLOC_CTX *mem_ctx, if (new_utdv) { enum ndr_err_code ndr_err; DATA_BLOB blob; - char *principal; if (DEBUGLEVEL >= 10) { NDR_PRINT_DEBUG(replUpToDateVectorBlob, new_utdv); @@ -136,24 +135,6 @@ static NTSTATUS keytab_finish(struct dssync_context *ctx, TALLOC_CTX *mem_ctx, if (!NT_STATUS_IS_OK(status)) { goto done; } - - principal = talloc_asprintf(mem_ctx, "UTDV/%s@%s", - ctx->nc_dn, ctx->dns_domain_name); - if (!principal) { - status = NT_STATUS_NO_MEMORY; - goto done; - } - - ret = libnet_keytab_remove_entries(keytab_ctx, principal, - 0, ENCTYPE_NULL); - if (ret) { - status = krb5_to_nt_status(ret); - ctx->error_message = talloc_asprintf(mem_ctx, - "Failed to remove old UTDV entries from " - "keytab %s: %s", keytab_ctx->keytab_name, - error_message(ret)); - goto done; - } } ret = libnet_keytab_add(keytab_ctx); |