Signed-off-by: Garming Sam <garming@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
# fl2000dc doesn't support AES
^samba4.krb5.kdc.*as-req-aes.*fl2000dc
# fl2000dc doesn't support AES
^samba4.krb5.kdc.*as-req-aes.*fl2000dc
-
-^samba4.ldap.linked_attributes.python\(ad_dc_ntvfs\).__main__.LATests.test_one_way_attributes\(ad_dc_ntvfs:local\)
-^samba4.ldap.linked_attributes.python\(ad_dc_ntvfs\).__main__.LATests.test_pretend_one_way_attributes\(ad_dc_ntvfs:local\)
renames of the target
*/
static int fix_one_way_link(struct extended_search_context *ac, struct ldb_dn *dn,
renames of the target
*/
static int fix_one_way_link(struct extended_search_context *ac, struct ldb_dn *dn,
- bool is_deleted_objects, bool *remove_value)
+ bool is_deleted_objects, bool *remove_value,
+ uint32_t linkID)
{
struct GUID guid;
NTSTATUS status;
{
struct GUID guid;
NTSTATUS status;
search_flags = DSDB_FLAG_NEXT_MODULE | DSDB_SEARCH_SEARCH_ALL_PARTITIONS | DSDB_SEARCH_ONE_ONLY;
search_flags = DSDB_FLAG_NEXT_MODULE | DSDB_SEARCH_SEARCH_ALL_PARTITIONS | DSDB_SEARCH_ONE_ONLY;
- if (ldb_request_get_control(ac->req, LDB_CONTROL_SHOW_DEACTIVATED_LINK_OID) ||
- is_deleted_objects) {
- search_flags |= DSDB_SEARCH_SHOW_DELETED;
+ if (linkID == 0) {
+ /* You must ALWAYS show one-way links regardless of the state of the target */
+ search_flags |= (DSDB_SEARCH_SHOW_DELETED | DSDB_SEARCH_SHOW_RECYCLED);
}
ret = dsdb_module_search(ac->module, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE, attrs,
}
ret = dsdb_module_search(ac->module, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE, attrs,
if (attribute->one_way_link &&
strcasecmp(attribute->lDAPDisplayName, "objectCategory") != 0) {
bool remove_value;
if (attribute->one_way_link &&
strcasecmp(attribute->lDAPDisplayName, "objectCategory") != 0) {
bool remove_value;
- ret = fix_one_way_link(ac, dn, is_deleted_objects, &remove_value);
+ ret = fix_one_way_link(ac, dn, is_deleted_objects, &remove_value,
+ attribute->linkID);
if (ret != LDB_SUCCESS) {
talloc_free(dsdb_dn);
return ldb_module_done(ac->req, NULL, NULL, ret);
if (ret != LDB_SUCCESS) {
talloc_free(dsdb_dn);
return ldb_module_done(ac->req, NULL, NULL, ret);