svn commit: samba r8511 - in branches/SAMBA_4_0/source/kdc: .

abartlet at samba.org abartlet at samba.org
Sat Jul 16 01:02:19 GMT 2005


Author: abartlet
Date: 2005-07-16 01:02:17 +0000 (Sat, 16 Jul 2005)
New Revision: 8511

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8511

Log:
This 'can't happen', but GCC gives warnings because it thinks it can.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/kdc/hdb-ldb.c


Changeset:
Modified: branches/SAMBA_4_0/source/kdc/hdb-ldb.c
===================================================================
--- branches/SAMBA_4_0/source/kdc/hdb-ldb.c	2005-07-15 21:36:00 UTC (rev 8510)
+++ branches/SAMBA_4_0/source/kdc/hdb-ldb.c	2005-07-16 01:02:17 UTC (rev 8511)
@@ -725,7 +725,7 @@
 
 	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 @@
 	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 @@
 	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, 



More information about the samba-cvs mailing list