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

abartlet at samba.org abartlet at samba.org
Fri Jun 15 00:14:12 GMT 2007


Author: abartlet
Date: 2007-06-15 00:14:11 +0000 (Fri, 15 Jun 2007)
New Revision: 23503

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

Log:
use hdb_dbc not hdb_openp.

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	2007-06-14 18:48:51 UTC (rev 23502)
+++ branches/SAMBA_4_0/source/kdc/hdb-ldb.c	2007-06-15 00:14:11 UTC (rev 23503)
@@ -988,7 +988,7 @@
 static krb5_error_code LDB_seq(krb5_context context, HDB *db, unsigned flags, hdb_entry_ex *entry)
 {
 	krb5_error_code ret;
-	struct hdb_ldb_seq *priv = (struct hdb_ldb_seq *)db->hdb_openp;
+	struct hdb_ldb_seq *priv = (struct hdb_ldb_seq *)db->hdb_dbc;
 	TALLOC_CTX *mem_ctx;
 	hdb_entry_ex entry_ex;
 	memset(&entry_ex, '\0', sizeof(entry_ex));
@@ -1015,7 +1015,7 @@
 
 	if (ret != 0) {
 		talloc_free(priv);
-		db->hdb_openp = 0;
+		db->hdb_dbc = NULL;
 	} else {
 		talloc_free(mem_ctx);
 	}
@@ -1027,7 +1027,7 @@
 					hdb_entry_ex *entry)
 {
 	struct ldb_context *ldb_ctx = (struct ldb_context *)db->hdb_db;
-	struct hdb_ldb_seq *priv = (struct hdb_ldb_seq *)db->hdb_openp;
+	struct hdb_ldb_seq *priv = (struct hdb_ldb_seq *)db->hdb_dbc;
 	char *realm;
 	struct ldb_dn *realm_dn = NULL;
 	struct ldb_result *res = NULL;
@@ -1038,7 +1038,7 @@
 
 	if (priv) {
 		talloc_free(priv);
-		db->hdb_openp = 0;
+		db->hdb_dbc = NULL;
 	}
 
 	priv = (struct hdb_ldb_seq *) talloc(db, struct hdb_ldb_seq);
@@ -1094,14 +1094,13 @@
 	priv->msgs = talloc_steal(priv, res->msgs);
 	talloc_free(res);
 
-	/* why has hdb_openp changed from (void *) to (int) ??? */
-	db->hdb_openp = (int)priv;
+	db->hdb_dbc = priv;
 
 	ret = LDB_seq(context, db, flags, entry);
 
 	if (ret != 0) {
     		talloc_free(priv);
-		db->hdb_openp = 0;
+		db->hdb_dbc = NULL;
 	} else {
 		talloc_free(mem_ctx);
 	}
@@ -1162,7 +1161,7 @@
 		return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
 	}
 
-	(*db)->hdb_openp = 0;
+	(*db)->hdb_dbc = NULL;
 	(*db)->hdb_open = LDB_open;
 	(*db)->hdb_close = LDB_close;
 	(*db)->hdb_fetch = LDB_fetch;



More information about the samba-cvs mailing list