|Main Archive Page > Month Archives > selinux archives|
Daniel J Walsh wrote:
> On 05/19/2009 12:16 PM, Chad Sellers wrote:
>> On 5/18/09 2:10 PM, "Daniel J Walsh"<firstname.lastname@example.org> wrote:
>>> Basically we need to search for all interfaces that return an int and
>>> set those up as python exception handlers.
>> I presume this supercedes the patch submitted on March 4 titled "Patch to
>> python bindings" which used a single generic exception handler. Is that
>> correct? Why the switch from a generic exception handler to a shell
>> to generate lots of specific exception handlers?
>> This message was distributed to subscribers of the selinux mailing list.
>> If you no longer wish to subscribe, send mail to
>> email@example.com with
>> the words "unsubscribe selinux" without quotes as the message.
> Yes, that patch caused certain interfaces to not work if they did not
> return int.
This doesn't strike me as the best way to handle it. Assuming all functions that return an int returns it as a return code is a little overzealous. For example selinux_file_context_cmp() returns 1, 0, -1 for comparison. It is only not included in the exception.sh output by accident it appears (it is defined as int selinux_file_context_cmp(...) rather than extern int.
Which brings up the next point, there are a handful of functions in selinux.h that don't have extern which means exception handlers aren't made for them. -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to firstname.lastname@example.org with the words "unsubscribe selinux" without quotes as the message.