mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
22208f52e6
dbcheck would fail to fix up attributes where the extended DN's GUID is correct, but the DN itself is incorrect. The code failed attempting to remove the old/incorrect DN, e.g. NOTE: old (due to rename or delete) DN string component for objectCategory in object CN=alice,CN=Users,DC=samba,DC=example,DC=com - <GUID=7bfdf9d8-62f9-420c-8a71-e3d3e931c91e>; CN=Person,CN=Schema,CN=Configuration,DC=samba,DC=bad,DC=com Change DN to <GUID=7bfdf9d8-62f9-420c-8a71-e3d3e931c91e>; CN=Person,CN=Schema,CN=Configuration,DC=samba,DC=example,DC=com? [y/N/all/none] y Failed to fix old DN string on attribute objectCategory : (16, "attribute 'objectCategory': no matching attribute value while deleting attribute on 'CN=alice,CN=Users,DC=samba,DC=example,DC=com'") The problem was the LDB message specified the value to delete with its full DN, including the GUID. The LDB code then helpfully corrected this value on the way through, so that the DN got updated to reflect the correct DN (i.e. 'DC=example,DC=com') of the object matching that GUID, rather than the incorrect DN (i.e. 'DC=bad,DC=com') that we were trying to remove. Because the requested value and the existing DB value didn't match, the operation failed. We can avoid this problem by passing down just the DN (not the extended DN) of the value we want to delete. Without the GUID portion of the DN, the LDB code will no longer try to correct it on the way through, and the dbcheck operation will succeed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13495 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> |
||
---|---|---|
.. | ||
wintest | ||
bogus.sh | ||
common_test_fns.inc | ||
common-links.sh | ||
dbcheck-links.sh | ||
dbcheck-oldrelease.sh | ||
dbcheck.sh | ||
demote-saveddb.sh | ||
dfree.sh | ||
dom_parse.sh | ||
functionalprep.sh | ||
nsstest.sh | ||
renamedc.sh | ||
runtime-links.sh | ||
schemaupgrade.sh | ||
subunit.sh | ||
test_chgdcpass.sh | ||
test_client_etypes.sh | ||
test_export_keytab_heimdal.sh | ||
test_export_keytab_mit.sh | ||
test_kinit_heimdal.sh | ||
test_kinit_mit.sh | ||
test_kinit_trusts_heimdal.sh | ||
test_kinit_trusts_mit.sh | ||
test_kpasswd_heimdal.sh | ||
test_kpasswd_mit.sh | ||
test_ktpass.sh | ||
test_ldb_simple.sh | ||
test_ldb.sh | ||
test_net_ads_dns.sh | ||
test_net_ads.sh | ||
test_net_rpc_user.sh | ||
test_password_settings.sh | ||
test_pdbtest.sh | ||
test_pkinit_heimdal.sh | ||
test_pkinit_pac_heimdal.sh | ||
test_samba_upgradedns.sh | ||
test_trust_ntlm.sh | ||
test_trust_token.sh | ||
test_trust_utils.sh | ||
test_wintest.sh | ||
tfork.sh | ||
tombstones-expunge.sh | ||
upgradeprovision-oldrelease.sh |