summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-07-16 01:02:17 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:33 -0500
commit24bef4a4bb8d8831d8deb8cd6691f8526af47f4e (patch)
treed80d64d915e6b870339e4fe23fe5136428097d3a /source4
parent0d48658ae0eeed41994ca9101cc361e150e7c45f (diff)
downloadsamba-24bef4a4bb8d8831d8deb8cd6691f8526af47f4e.tar.gz
samba-24bef4a4bb8d8831d8deb8cd6691f8526af47f4e.tar.xz
samba-24bef4a4bb8d8831d8deb8cd6691f8526af47f4e.zip
r8511: This 'can't happen', but GCC gives warnings because it thinks it can.
Andrew Bartlett (This used to be commit 40088b9566e8f63897958fc99d99dedb38e0cb69)
Diffstat (limited to 'source4')
-rw-r--r--source4/kdc/hdb-ldb.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index 1e99511792e..af93ea8f72f 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -725,7 +725,7 @@ static krb5_error_code LDB_fetch(krb5_context context, HDB *db, unsigned flags,
const char *realm;
const char *realm_dn;
- TALLOC_CTX *mem_ctx = talloc_named(NULL, 0, "LDB_fetch context\n");
+ TALLOC_CTX *mem_ctx = talloc_named(NULL, 0, "LDB_fetch context");
if (!mem_ctx) {
krb5_set_error_string(context, "LDB_fetch: talloc_named() failed!");
@@ -737,7 +737,7 @@ static krb5_error_code LDB_fetch(krb5_context context, HDB *db, unsigned flags,
ret = LDB_lookup_realm(context, (struct ldb_context *)db->hdb_db,
mem_ctx, realm, &realm_msg);
if (ret != 0) {
- krb5_warnx(context, "LDB_fetch: could not find realm\n");
+ krb5_warnx(context, "LDB_fetch: could not find realm");
talloc_free(mem_ctx);
return HDB_ERR_NOENTRY;
}
@@ -781,6 +781,10 @@ static krb5_error_code LDB_fetch(krb5_context context, HDB *db, unsigned flags,
case HDB_ENT_TYPE_ANY:
ldb_ent_type = HDB_LDB_ENT_TYPE_ANY;
break;
+ default:
+ krb5_warnx(context, "LDB_fetch: invalid ent_type specified!");
+ talloc_free(mem_ctx);
+ return HDB_ERR_NOENTRY;
}
ret = LDB_lookup_principal(context, (struct ldb_context *)db->hdb_db,