[Freeipa-devel] [PATCH] 0008 - Make sure the nolog argument to ipautil.run is not a bare string

Petr Viktorin pviktori at redhat.com
Mon Feb 13 16:07:39 UTC 2012


`ipautil.run` expects a tuple for its `nolog` argument, but works with 
any other iterable (sometimes we use lists as well). Since strings are 
also iterable, and yield their characters, this caused every individual 
character in the password to be replaced, leading to log messages like:

---
You will be prompXXXXXXXXed for XXXXXXXXhe daXXXXXXXXabase MasXXXXXXXXer 
Password.
XXXXXXXXXXXXXXXX is imporXXXXXXXXaXXXXXXXXXXXXXXXX XXXXXXXXhaXXXXXXXX 
you NOT FOXXXXXXXXGET XXXXXXXXhis password.
---



The attached patch modifies ipautil.run to ensure nolog is not a bare 
string. It also fixes a call in ipaserver/install/krbinstance.py.

-- 
Petr³

P.S. Iterability of strings is one of my least favorite Python features.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0008-Make-sure-the-nolog-argument-to-ipautil.run-is-a-tup.patch
Type: text/x-patch
Size: 2134 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120213/85adb658/attachment.bin>


More information about the Freeipa-devel mailing list