#47735 e_uniqueid fails to set if an entry is a conflict entry
Closed: wontfix None Opened 10 years ago 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

Reviewed by Rich (Thank you!!)

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

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

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

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

Description: In commit e2b8468,
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 a7ac181

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

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

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

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

7 years ago

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)

3 years ago

Login to comment on this ticket.

Metadata