Files
freeipa/ipaserver/plugins
Florence Blanc-Renaud 07975b52c3 trust-add: handle missing msSFU30MaxGidNumber
When ipa trust-add is executed with --range-type ad-trust-posix,
the server tries to find the max uidnumber and max gidnumber
from AD domain controller.
The values are extracted from the entry
CN=<domain>,CN=ypservers,CN=ypServ30,CN=RpcServices,CN=System,<AD suffix>
in the msSFU30MaxUidNumber and msSFU30MaxGidNumber attributes.

msSFU30MaxUidNumber is required but not msSFU30MaxGidNumber.
In case msSFU30MaxGidNumber is missing, the code is currently assigning
a "None" value and later on evaluates the max between this value and
msSFU30MaxUidNumber. The max function cannot compare None and a list
of string and triggers an exception.

To avoid the exception, assign [b'0'] to max gid if msSFU30MaxGidNumber
is missing. This way, the comparison succeeds and max returns the
value from msSFU30MaxUidNumber.

Fixes: https://pagure.io/freeipa/issue/9310
Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2023-01-25 15:23:29 +01:00
..
2010-12-20 17:19:53 -05:00
2022-03-11 13:37:08 -05:00
2022-03-11 13:37:08 -05:00
2023-01-10 08:30:58 +01:00
2022-03-11 13:37:08 -05:00
2022-06-09 08:35:15 +02:00
2023-01-10 08:30:58 +01:00
2019-10-21 18:01:32 +11:00
2022-09-29 14:23:44 +02:00
2019-03-28 00:21:00 +01:00
2022-03-11 13:37:08 -05:00
2023-01-10 08:30:58 +01:00
2020-03-31 09:21:37 +03:00
2020-09-23 14:49:15 +02:00
2018-01-09 07:53:28 +01:00
2022-03-11 13:37:08 -05:00
2023-01-10 08:30:58 +01:00
2023-01-10 08:30:58 +01:00