WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH] CA-27004: digit-only hostnames cannot join AD domain

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] CA-27004: digit-only hostnames cannot join AD domain
From: Marcus Granado <marcus.granado@xxxxxxxxxx>
Date: Tue, 20 Apr 2010 16:32:43 +0100
Delivery-date: Tue, 20 Apr 2010 08:33:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
 ocaml/auth/extauth_plugin_ADlikewise.ml |  16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)


# HG changeset patch
# User Marcus Granado <marcus.granado@xxxxxxxxxx>
# Date 1271776684 -3600
# Node ID 03c0dc63ddb2c5e8c38d3b90d3d4000e38393bf3
# Parent  9644b3a57cbac00b83ebed07c49b518907403ebd
CA-27004: digit-only hostnames cannot join AD domain

That's a current limitation of Likewise on Linux.

Signed-off-by: Marcus Granado <marcus.granado@xxxxxxxxxxxxx>

diff -r 9644b3a57cba -r 03c0dc63ddb2 ocaml/auth/extauth_plugin_ADlikewise.ml
--- a/ocaml/auth/extauth_plugin_ADlikewise.ml   Tue Apr 20 14:15:07 2010 +0100
+++ b/ocaml/auth/extauth_plugin_ADlikewise.ml   Tue Apr 20 16:18:04 2010 +0100
@@ -526,6 +526,22 @@
        end
        
        else (* we have all the required parameters *)
+
+       let hostname =
+               Server_helpers.exec_with_new_task "retrieving hostname"
+                       (fun __context ->
+                                let host = Helpers.get_localhost ~__context in
+                                Db.Host.get_hostname ~__context ~self:host
+                       )
+       in
+       if (Stringext.String.fold_left
+                        (fun b ch -> b && (ch>='0')&&(ch<='9'))
+                        true
+                        hostname
+                )
+       then 
+               raise (Auth_signature.Auth_service_error 
(Auth_signature.E_GENERIC,(Printf.sprintf "hostname '%s' cannot contain only 
digits." hostname)))
+       else
        
        let domain = 
                let service_name = Server_helpers.exec_with_new_task 
"retrieving external_auth_service_name"

Attachment: xen-api.hg.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] CA-27004: digit-only hostnames cannot join AD domain, Marcus Granado <=