diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-08-04 14:59:47 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-08-04 09:34:08 +0200 |
commit | fff3f290736f0b75903bfefeb961ee935930303b (patch) | |
tree | 6c093b287f3561ce3864c41e13ecb5b07ceeec9e /lib/ldb-samba | |
parent | 73677875b46251f59b66c9713f1decc89bd2ea3e (diff) | |
download | samba-fff3f290736f0b75903bfefeb961ee935930303b.tar.gz samba-fff3f290736f0b75903bfefeb961ee935930303b.tar.bz2 samba-fff3f290736f0b75903bfefeb961ee935930303b.zip |
s4-ldb: two DNs only match if they have the same deletion status
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Aug 4 09:34:08 CEST 2011 on sn-devel-104
Diffstat (limited to 'lib/ldb-samba')
-rw-r--r-- | lib/ldb-samba/ldif_handlers.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/ldb-samba/ldif_handlers.c b/lib/ldb-samba/ldif_handlers.c index a89749750f..6ca419b139 100644 --- a/lib/ldb-samba/ldif_handlers.c +++ b/lib/ldb-samba/ldif_handlers.c @@ -1130,6 +1130,7 @@ static int samba_dn_extended_match(struct ldb_context *ldb, TALLOC_CTX *tmp_ctx; struct ldb_dn *dn1, *dn2; const struct ldb_val *guid1, *guid2, *sid1, *sid2; + uint32_t rmd_flags1, rmd_flags2; tmp_ctx = talloc_new(ldb); @@ -1142,6 +1143,18 @@ static int samba_dn_extended_match(struct ldb_context *ldb, return LDB_SUCCESS; } + rmd_flags1 = dsdb_dn_rmd_flags(dn1); + rmd_flags2 = dsdb_dn_rmd_flags(dn2); + + if ((rmd_flags1 & DSDB_RMD_FLAG_DELETED) != + (rmd_flags2 & DSDB_RMD_FLAG_DELETED)) { + /* only match if they have the same deletion status */ + talloc_free(tmp_ctx); + (*matched) = false; + return LDB_SUCCESS; + } + + guid1 = ldb_dn_get_extended_component(dn1, "GUID"); guid2 = ldb_dn_get_extended_component(dn2, "GUID"); if (guid1 && guid2) { |