[Freeipa-devel] [PATCH 74] Fix name error in hbactest

John Dennis jdennis at redhat.com
Thu Apr 19 13:04:34 UTC 2012


Ticket #2512

In hbactest.py there is a name error wrapped inside a try/except block
that ignores all errors so the code block exits prematurely leaving a
critical variable uninitialized.

The name error is the result of a cut-n-paste error that references a
variable that had never been initialized in the scope of the code
block. Python generates an exception when this variable is referenced
but because it's wrapped in a try/except block that catches all errors
and ignores all errors there is no evidence that something went wrong.

The fix is to use the correct variables.

At some point we may want to revist if ignoring all errors and
proceding as if nothing happened is actually correct. Alexander tells
me this mimics what SSSD does in the hbac rule processing, thus the
ignoring of errors is intentional. But in a plugin whose purpose is to
test and exercise hbac rules I'm not sure ignoring all errors is
really the right behavior.

--
John Dennis <jdennis at redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-jdennis-0074-Fix-name-error-in-hbactest.patch
Type: text/x-patch
Size: 2576 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120419/4bc98f66/attachment.bin>


More information about the Freeipa-devel mailing list