svn commit: samba r17054 - in branches/SOC/mkhl/ldb-map/modules: .

mkhl at samba.org mkhl at samba.org
Sat Jul 15 09:13:29 GMT 2006


Author: mkhl
Date: 2006-07-15 09:13:29 +0000 (Sat, 15 Jul 2006)
New Revision: 17054

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

Log:
When renaming, skip requests if neither DN is in the local partition.
Fail if either is but the other isn't.

Martin

Modified:
   branches/SOC/mkhl/ldb-map/modules/ldb_map.c


Changeset:
Modified: branches/SOC/mkhl/ldb-map/modules/ldb_map.c
===================================================================
--- branches/SOC/mkhl/ldb-map/modules/ldb_map.c	2006-07-15 09:11:02 UTC (rev 17053)
+++ branches/SOC/mkhl/ldb-map/modules/ldb_map.c	2006-07-15 09:13:29 UTC (rev 17054)
@@ -2615,11 +2615,15 @@
 		return ldb_next_request(module, req);
 
 	/* no mapping requested, skip to next module */
-	/* TODO: both? either? neither? what to do in each case? */
-	if (!check_dn_local(module, req->op.rename.olddn) ||
+	if (!check_dn_local(module, req->op.rename.olddn) &&
 	    !check_dn_local(module, req->op.rename.newdn))
 		return ldb_next_request(module, req);
 
+	/* rename into/out of the mapped partition requested, bail out */
+	if (!check_dn_local(module, req->op.rename.olddn) ||
+	    !check_dn_local(module, req->op.rename.newdn))
+		return LDB_ERR_AFFECTS_MULTIPLE_DSAS;
+
 	/* prepare async context and handle */
 	h = map_init_handle(req, module);
 	if (h == NULL)



More information about the samba-cvs mailing list