summaryrefslogtreecommitdiff
path: root/source4/kdc
diff options
context:
space:
mode:
authorMichael Wood <esiotrot@gmail.com>2012-01-20 08:30:18 +0200
committerAndrew Bartlett <abartlet@samba.org>2012-01-21 13:06:35 +0100
commitd65f33de1d14be22a159211f0c835b6fe170cc14 (patch)
treec6c078da69a3b24266ee037e4be874984289060f /source4/kdc
parent39ee332f35d42b0c9f53961128a486c01576ea66 (diff)
downloadsamba-d65f33de1d14be22a159211f0c835b6fe170cc14.tar.gz
samba-d65f33de1d14be22a159211f0c835b6fe170cc14.tar.bz2
samba-d65f33de1d14be22a159211f0c835b6fe170cc14.zip
Log short_princ instead of uninitialised filter.
Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sat Jan 21 13:06:35 CET 2012 on sn-devel-104
Diffstat (limited to 'source4/kdc')
-rw-r--r--source4/kdc/db-glue.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c
index ae93b75bef..77c84303a5 100644
--- a/source4/kdc/db-glue.c
+++ b/source4/kdc/db-glue.c
@@ -1363,7 +1363,6 @@ static krb5_error_code samba_kdc_lookup_server(krb5_context context,
} else {
int lret;
- char *filter = NULL;
char *short_princ;
const char *realm;
/* server as client principal case, but we must not lookup userPrincipalNames */
@@ -1386,16 +1385,18 @@ static krb5_error_code samba_kdc_lookup_server(krb5_context context,
DSDB_SEARCH_SHOW_EXTENDED_DN | DSDB_SEARCH_NO_GLOBAL_CATALOG,
"(&(objectClass=user)(samAccountName=%s))",
ldb_binary_encode_string(mem_ctx, short_princ));
- free(short_princ);
if (lret == LDB_ERR_NO_SUCH_OBJECT) {
- DEBUG(3, ("Failed find a entry for %s\n", filter));
+ DEBUG(3, ("Failed to find an entry for %s\n", short_princ));
+ free(short_princ);
return HDB_ERR_NOENTRY;
}
if (lret != LDB_SUCCESS) {
- DEBUG(3, ("Failed single search for for %s - %s\n",
- filter, ldb_errstring(kdc_db_ctx->samdb)));
+ DEBUG(3, ("Failed single search for %s - %s\n",
+ short_princ, ldb_errstring(kdc_db_ctx->samdb)));
+ free(short_princ);
return HDB_ERR_NOENTRY;
}
+ free(short_princ);
}
return 0;