[Freeipa-devel] [PATCH] 23 Allow one letter net/hostgroups names

Ondrej Hamada ohamada at redhat.com
Fri May 4 08:37:10 UTC 2012


On 05/03/2012 05:44 PM, Martin Kosek wrote:
> On Thu, 2012-05-03 at 17:08 +0200, Ondrej Hamada wrote:
>> On 05/02/2012 05:49 PM, Ondrej Hamada wrote:
>>> https://fedorahosted.org/freeipa/ticket/2671
>>>
>>> Changed regex validating net/hostgroup names to allow single letter
>>> names. Unit-tests added.
>>>
>>> But the current validation allows weird (host|net)group names like:
>>> ".",  ".-", "..".
>>> I'm just not sure, do we really want to allow stuff like this?
>>>
>>> Patch also fixes one of netgroup and host unit-tests. The error
>>> message in hostname validation function has changed (in ticket
>>> #1966).
>>>
>>>
> NACK.
>
> 1) This breaks the hostgroup tests as you overwrite dn1 variable:
>
> +hostgroup_single = u'a'
> +dn1 = DN(('cn',hostgroup_single),('cn','hostgroups'),('cn','accounts'),
> +         api.env.basedn)
> +
>
>
> 2) The extra comment in netgroup tests is redundant:
>
> +                result=dict(
> +#                    dn=u'ipauniqueid=%s,cn=ng,cn=alt,%s' %
> (fuzzy_uuid, api.env.basedn),
> +                    dn=fuzzy_netgroupdn,
>
> 3) I don't think that we need to bump IPA_API_VERSION_MINOR since we
> just changed the validating pattern and thus this really does not change
> the API itself.
>
> Martin
>
corrected patch attached

-- 
Regards,

Ondrej Hamada
FreeIPA team
jabber: ohama at jabbim.cz
IRC: ohamada

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-ohamada-23-3-Allow-one-letter-net-hostgroups-names.patch
Type: text/x-patch
Size: 17002 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20120504/a23595f7/attachment.bin>


More information about the Freeipa-devel mailing list