[Freeipa-devel] [PATCH] 0044 Validate externalhost (when added by --addattr/--setattr)

Petr Viktorin pviktori at redhat.com
Wed May 9 14:49:46 UTC 2012


On 05/04/2012 01:25 PM, Ondrej Hamada wrote:
> On 04/30/2012 02:13 PM, Petr Viktorin wrote:
>>
>> Change the externalhost attribute of hbacrule, netgroup
>> and sudorule into a full-fledged Parameter, and attach
>> a validator to it.
>>
>> RFC 1123 specifies that only [-a-z0-9] are allowed, but apparently
>> Windows and some phones also use underscores in hostnames.
>> So the new validator allows the underscore.
>>
>>
>> https://fedorahosted.org/freeipa/ticket/2649
>>
>>
>>
>> _______________________________________________
>> Freeipa-devel mailing list
>> Freeipa-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/freeipa-devel
> 1) Current validation of external hostnames does not require them to be
> fully qualified, but you do. It's inconsistent.
>
> 2) one test case failed:
> FAIL: Test adding an invalid external host to Sudo rule using
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
> self.test(*self.arg)
> File "/home/ohamada/2649/tests/test_xmlrpc/test_sudorule_plugin.py",
> line 500, in test_a_sudorule_mod_externalhost_invalid_addattr
> "character")
> AssertionError
>

Thanks. Attaching updated patch.


-- 
Petr³
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0044-02-Validate-externalhost-when-added-by-addattr-setattr.patch
Type: text/x-patch
Size: 9078 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120509/404aa880/attachment.bin>


More information about the Freeipa-devel mailing list