[Freeipa-devel] [PATCH] 0067 Handle exceptions when establishing trusts

Martin Kosek mkosek at redhat.com
Fri Aug 3 09:07:33 UTC 2012


On 08/01/2012 10:33 AM, Alexander Bokovoy wrote:
> On Wed, 01 Aug 2012, Alexander Bokovoy wrote:
>> Hi,
>>
>> I'm almost on vacation ... after this patch. :)
>>
>> Translate exceptions produced by DCERPC bindings when establishing
>> trusts.
>>
>> There are two types of errors that may be produced by DCERPC bindings:
>> - RuntimeError with a text
>>  (RuntimeError('NT_STATUS_OBJECT_NAME_NOT_FOUND')
>> - RuntimeError with a numeric code and 'friendly' message
>>
>> Error codes could have two prefixes:
>>  - NT error codes, start with NT_STATUS_ prefix
>>  - Windows error codes, start with WERR_ prefix
>>
>> Full list of errors is available in Samba source code:
>>  libcli/util/ntstatus.h: NT_STATUS error codes
>>  libcli/util/werror.h: Windows error codes
>>
>> Majority of errors returned when dealing with trusts are of NT_STATUS
>> type, these also include all typical POSIX errors mapped to corresponding NT
>> errors.
>>
>> Unfortunately, in the textual RuntimeError case very little can be done
>> to get better clarification of the error. More error paths will need to be
>> added as they will be discovered -- DCERPC error messaging is complex.
>>
>> https://fedorahosted.org/freeipa/ticket/2868
> Too fast :)
> 
> Updated patch, fixed one copy paste place where different type of
> RuntimeError is used (all LSA exceptions are of (num, message) type).
> 

Looks OK. I just had to fix few formatting errors (8-space indentation, ...)
before I could push this. I also noticed that i18n is missing for many error
messages in the new code. I created a ticket to address it later:
https://fedorahosted.org/freeipa/ticket/2964

ACK. Pushed to master.

Martin




More information about the Freeipa-devel mailing list