<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 05/09/2012 04:49 PM, Petr Viktorin wrote:
    <blockquote cite="mid:4FAA840A.6070203@redhat.com" type="cite">On
      05/04/2012 01:25 PM, Ondrej Hamada wrote:
      <br>
      <blockquote type="cite">On 04/30/2012 02:13 PM, Petr Viktorin
        wrote:
        <br>
        <blockquote type="cite">
          <br>
          Change the externalhost attribute of hbacrule, netgroup
          <br>
          and sudorule into a full-fledged Parameter, and attach
          <br>
          a validator to it.
          <br>
          <br>
          RFC 1123 specifies that only [-a-z0-9] are allowed, but
          apparently
          <br>
          Windows and some phones also use underscores in hostnames.
          <br>
          So the new validator allows the underscore.
          <br>
          <br>
          <br>
          <a class="moz-txt-link-freetext" href="https://fedorahosted.org/freeipa/ticket/2649">https://fedorahosted.org/freeipa/ticket/2649</a>
          <br>
          <br>
          <br>
          <br>
          _______________________________________________
          <br>
          Freeipa-devel mailing list
          <br>
          <a class="moz-txt-link-abbreviated" href="mailto:Freeipa-devel@redhat.com">Freeipa-devel@redhat.com</a>
          <br>
          <a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-devel">https://www.redhat.com/mailman/listinfo/freeipa-devel</a>
          <br>
        </blockquote>
        1) Current validation of external hostnames does not require
        them to be
        <br>
        fully qualified, but you do. It's inconsistent.
        <br>
        <br>
        2) one test case failed:
        <br>
        FAIL: Test adding an invalid external host to Sudo rule using
        <br>
----------------------------------------------------------------------
        <br>
        Traceback (most recent call last):
        <br>
        File "/usr/lib/python2.7/site-packages/nose/case.py", line 197,
        in runTest
        <br>
        self.test(*self.arg)
        <br>
        File
        "/home/ohamada/2649/tests/test_xmlrpc/test_sudorule_plugin.py",
        <br>
        line 500, in test_a_sudorule_mod_externalhost_invalid_addattr
        <br>
        "character")
        <br>
        AssertionError
        <br>
        <br>
      </blockquote>
      <br>
      Thanks. Attaching updated patch.
      <br>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Freeipa-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-devel@redhat.com">Freeipa-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-devel">https://www.redhat.com/mailman/listinfo/freeipa-devel</a></pre>
    </blockquote>
    Suggestion: you can use ipalib.utils.validate_hostname function with
    check_fqdn param set to False. Sorry for not mentioning it before.<br>
    <br>
    Otherwise ACK<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Regards,

Ondrej Hamada
FreeIPA team
jabber: <a class="moz-txt-link-abbreviated" href="mailto:ohama@jabbim.cz">ohama@jabbim.cz</a>
IRC: ohamada</pre>
  </body>
</html>