On 09/29/2010 11:03 PM, Rob Crittenden wrote:
When doing an addattr check to see if we are creating a multi-value
attribute and see if that is allowed by the Param and/or the attribute
in the schema (SINGLE-VALUE).
Pavel, check my fix in the exception callback. It was passing attrs_list
but that isn't set until later. I decided to send an empty list instead.
Also catch RDN update exceptions and return an error about primary keys
(which this essentially means).
The patch isn't all bad, but the single-value check is in the wrong place. As a
result, it only applies when someone tries to add a new value to attributes
already present in the original entry. It won't fire when someone is trying to
add more than one value if there was none before and it also won't fire when
creating new entries.
I reworked your patch a bit a merged it with my patch number 32, because they
overlap in functionality.
See freeipa-devel thread: [PATCH] Check if attribute is single-value before
trying to add values to it.
Freeipa-devel mailing list