[Freeipa-devel] [PATCH 0072] Provide ipa-client-advise tool

Tomas Babej tbabej at redhat.com
Mon Jun 24 12:55:08 UTC 2013


On 06/24/2013 09:35 AM, Petr Spacek wrote:
> What would happen if require_root = False, UID = 1234 but the plugin 
> requires root access? (I.e. there is an error in the require_root value.)

The calling of particular external command that requires root access for 
its execution will fail.
>
> I don't like this boolean, because plugin author has to test the 
> plugin and maintain the boolean after each change in the plugin. From 
> my (naive) point of view it is error prone and unnecessary.

Why? From my point of view, it simplifies the work for the plugin 
author, since he can set the boolean if he knows that plugin will need 
root access to require information needed.

Without it:
- If he wanted to stay user-friendly he would have to implement the 
check for effective UID in every plugin.
- If he did not, he would be having his command fail with (often) 
cryptic errors.

>
> Proper error handling seems like 'the right way'™ to me.
>

What kind of proper error handling? The errors are now properly handled 
via AdminTool's framework.

Tomas




More information about the Freeipa-devel mailing list