#2922 ID mapping - bug in computing max id for slice range
Closed: Fixed None Opened 3 years ago by preichl.

There seems to be a bug in the way we assign ranges for domain when we algorithmically perform id mapping.

In sss_idmap_calculate_range() we compute the upper limit for ids max as being 'min + range' which means that actual range of ids is:

max - min + 1 = min + range - min + 1 = range + 1

And this differs from range by 1.

We should be even be able to see some mapping issue with secondary ranges. The last POSIX ID from a range and the first POSIX ID from the next range should return the same SID/RID.

In the IPA code there is 'range.max = r->base_id + r->id_range_size -1;' We should amend code to the same.

If there's seems to be a bug could you write unit test which will fail? TDD way.

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.13.4
priority: major => critical

There is a missing unit test for this bug.
We needn't open new bug and it can be tracked here.

Man page change:



Fields changed

owner: somebody => preichl
status: new => assigned

Fields changed

patch: 0 => 1

Unit test



resolution: => fixed
status: assigned => closed

Metadata Update from @preichl:
- Issue assigned to preichl
- Issue set to the milestone: SSSD 1.13.4

2 years ago

Login to comment on this ticket.