mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Do not hide idrange-add errors when adding trust
We catched all errors that could be raised by idrange-add command and just raised an uncomprehensible ValidationError. This could hide a real underlying problem and make the debugging harder. We should rather just let the command raise the real error (which will be already a PublicError). https://fedorahosted.org/freeipa/ticket/3288
This commit is contained in:
parent
dcc6f13a58
commit
158bf45cae
@ -346,15 +346,12 @@ sides.
|
|||||||
else:
|
else:
|
||||||
base_id = 200000 + (pysss_murmur.murmurhash3(dom_sid, len(dom_sid), 0xdeadbeef) % 10000) * 200000
|
base_id = 200000 + (pysss_murmur.murmurhash3(dom_sid, len(dom_sid), 0xdeadbeef) % 10000) * 200000
|
||||||
|
|
||||||
try:
|
# Add new ID range
|
||||||
new_range = api.Command['idrange_add'](range_name,
|
api.Command['idrange_add'](range_name,
|
||||||
ipabaseid=base_id,
|
ipabaseid=base_id,
|
||||||
ipaidrangesize=options['range_size'],
|
ipaidrangesize=options['range_size'],
|
||||||
ipabaserid=0,
|
ipabaserid=0,
|
||||||
ipanttrusteddomainsid=dom_sid)
|
ipanttrusteddomainsid=dom_sid)
|
||||||
except Exception, e:
|
|
||||||
raise errors.ValidationError(name=_('ID range exists'),
|
|
||||||
error = _('ID range already exists, must be added manually'))
|
|
||||||
|
|
||||||
def execute_ad(self, *keys, **options):
|
def execute_ad(self, *keys, **options):
|
||||||
# Join domain using full credentials and with random trustdom
|
# Join domain using full credentials and with random trustdom
|
||||||
|
Loading…
Reference in New Issue
Block a user