[Freeipa-devel] [PATCH] 0001 Refactor selinuxenabled check

Francesco Marella fra.marella at gmx.com
Fri Sep 26 15:53:20 UTC 2014


On 26/09/2014 17:43, thierry bordaz wrote:
> Hello,
>
>     When called from set_selinux_booleans, if not selinux_enabled, you
>     may want to 'return False' rather than 'return'.
>     Now it looks like callers of set_selinux_booleans do not check the
>     returned value :-)
>
>     thanks
>     thierry
>
> On 09/26/2014 05:26 PM, Francesco Marella wrote:
>> This should be the final one.
>>
>> fm
>>
>> On 26/09/2014 16:30, Francesco Marella wrote:
>>>
>>> On 26/09/2014 15:41, Petr Viktorin wrote:
>>>>
>>>> Hello! Thanks for the patch!
>>>>
>>>> The new function is not one of the platform-independent tasks, and 
>>>> doesn't even use `self`, so you can define it as a module-level 
>>>> helper function.
>>>>
>>>> But more importantly, this won't work: the blocks you are replacing 
>>>> return from their functions. You'd need to use something like:
>>>>     if not selinux_enabled():
>>>>         return
>>>> instead of:
>>>>     self.check_enabled_selinux()
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Freeipa-devel mailing list
>>> Freeipa-devel at redhat.com
>>> https://www.redhat.com/mailman/listinfo/freeipa-devel
>>
>>
>>
>> _______________________________________________
>> Freeipa-devel mailing list
>> Freeipa-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/freeipa-devel
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20140926/2b8383ed/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-fmarella-0001-4-0001-Refactor-selinuxenabled-check.patch
Type: text/x-patch
Size: 2909 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20140926/2b8383ed/attachment.bin>


More information about the Freeipa-devel mailing list