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

Martin Kosek mkosek at redhat.com
Mon May 7 06:40:55 UTC 2012


On Fri, 2012-05-04 at 10:37 +0200, Ondrej Hamada wrote:
> 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
> 

ACK. Pushed to master.

Martin




More information about the Freeipa-devel mailing list