#47735 e_uniqueid fails to set if an entry is a conflict entry
Closed: wontfix Opened by nhosoi.

When an entry is turned to be a conflict entry, its nsUniqueId has a mdcsn info as a subtype like this:

nsUniqueId;mdcsn-5319136f000200010000: c5e0d787-a58f11e3-b7f9dfd1-acc3d5e4

In this case, the attribute type is assigned to the berval "type" as follows:

type.bv_val = "nsUniqueId;mdcsn-5319136f000200010000"
type.bv_len = 37

The subtyped stateinfo is processed in str2entry_state_information_from_type, which modifies type.bv_val to "nsUniqueId", but type.bv_len remains 37.

str2entry_fast has this logic to set e_uniqueid, where the nsUniqueId with stateinfo fails to set the value to e_uniqueid.
if ( type.bv_len == 10 && PL_strncasecmp (type.bv_val, "nsUniqueId", type.bv_len) == 0 ){


{{{
138 static void
139 str2entry_state_information_from_type(char s, ber_len_t baselen,
}}}
What about just using a struct berval?
{{{
138 static void
139 str2entry_state_information_from_type(struct berval *atype,
}}}

Yes, it looks cleaner. Let me modify it... Thanks, Rich!

git patch file (master; take 2) -- merged 2 args into 1 in str2entry_state_information_from_type (Thanks to Rich for his suggestion).
0001-Ticket-47735-e_uniqueid-fails-to-set-if-an-entry-is-.2.patch

Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1074076

Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1074084

Reviewed by Rich (Thank you!!)

Pushed to master:
e7f7e91..07bd225 master -> master
commit 07bd2259cc45c9d5c193b15faaf0d0c60e1b723c

Pushed to 389-ds-base-1.3.2:
c40e1cd..6e0ffbe 389-ds-base-1.3.2 -> 389-ds-base-1.3.2
commit 6e0ffbe1bdde99cfd71a5617d89482eef4696c7f

Pushed to 389-ds-base-1.3.1:
de8d28b..d4350bd 389-ds-base-1.3.1 -> 389-ds-base-1.3.1
commit d4350bd0724c37040a4aaf361a10918c925b7605

Pushed to 389-ds-base-1.2.11:
e0fd1ff..e1f92c0 389-ds-base-1.2.11 -> 389-ds-base-1.2.11
commit e1f92c03b03f22ec4533d777413b9437eb9cb81c

Description: In commit e2b8468f459647261812f542485f3481d39bd26c,
to get the base type length when a state info is stripped from
the attribute type, the fix in str2entry_state_information_from_type
blindly returned the base type length for the ordinary sub-typed
attributes. This patch fixes it so that only when the state info
is removed, the length is reset.

git patch file (1.3.1) -- fixing the sub-typed attribute problem
0001-Ticket-47735-e_uniqueid-fails-to-set-if-an-entry-is-.3.patch

Reviewed by Rich (Thank you!!)

Pushed to master:
b9901f1..a7ac181 master -> master
commit a7ac181d60b1f2ecd3640d0b610eba300b7c3cdb

Pushed to 389-ds-base-1.3.2:
eb10369..4ffa824 389-ds-base-1.3.2 -> 389-ds-base-1.3.2
commit 4ffa8247ab9dcc45137f07511d62ea33c24f76df

Pushed to 389-ds-base-1.3.1:
0a28515..093a146 389-ds-base-1.3.1 -> 389-ds-base-1.3.1
commit 093a146853e6bb44b08c36a1da22735633adbd4a

Pushed to 389-ds-base-1.2.11:
1c552d5..2bb0f1b 389-ds-base-1.2.11 -> 389-ds-base-1.2.11
commit 2bb0f1b2b9b1c69118d8c8db1c5426eb7d7690ea

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.2.11.26

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/1068

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

Metadata