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

RE: [Xen-API] [PATCH] CA-38369: update meaning of 0x5, 0xD, 0x251E error

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-API] [PATCH] CA-38369: update meaning of 0x5, 0xD, 0x251E error codes from LW54
From: Marcus Granado <Marcus.Granado@xxxxxxxxxxxxx>
Date: Tue, 9 Mar 2010 13:18:04 +0000
Accept-language: en-US
Acceptlanguage: en-US
Delivery-date: Tue, 09 Mar 2010 05:18:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <291EDFCB1E9E224A99088639C47620225437B7F578@xxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <89fbc491696ac4e83ba9.1267209046@localhost> <291EDFCB1E9E224A99088639C47620225437B7F578@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acq3EclEy+LsD4w2Tvy1FAh3/kRNDQIdwgLwAABl9ZA=
Thread-topic: [Xen-API] [PATCH] CA-38369: update meaning of 0x5, 0xD, 0x251E error codes from LW54
# HG changeset patch
# User Marcus Granado <marcus.granado@xxxxxxxxxx>
# Date 1268140472 0
# Node ID d848b08298cf22dde2c2a962c4a9d7da92de4f6e
# Parent  aebc9b3ce802446fb51cbdfb793ac970836558af
CA-38369: fix errorcode regression in xapi with LW54 during domain-join-leave

this patch only adds the new error codes; it doesn't modify the error strings.

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

diff -r aebc9b3ce802 -r d848b08298cf ocaml/auth/extauth_plugin_ADlikewise.ml
--- a/ocaml/auth/extauth_plugin_ADlikewise.ml   Thu Feb 25 17:11:36 2010 +0000
+++ b/ocaml/auth/extauth_plugin_ADlikewise.ml   Tue Mar 09 13:14:32 2010 +0000
@@ -589,11 +589,12 @@
                then begin
                        raise (Auth_signature.Auth_service_error "The username 
or password is wrong.")
                end
-               else if has_substr errmsg "0x5 " (* Unknown error *)
+               else if has_substr errmsg "(0x5)" (* Unknown error *)
                then begin (* this seems to be a 
not-enough-permission-to-join-the-domain error *)
                        raise (Auth_signature.Auth_service_error "Permission 
denied. The user has no administrator rights to join the domain.")
                end
-               else if has_substr errmsg "0x9CAC" (* Failed to lookup the 
domain controller for given domain. *)       
+               else if has_substr errmsg "0x9CAC" (* Failed to lookup the 
domain controller for given domain. *)
+                       or has_substr errmsg "0x251E" (* DNS_ERROR_BAD_PACKET *)
                then begin (* this seems to be a wrong domain controller name 
error... *)
                        raise (Auth_signature.Auth_service_error "Failed to 
lookup the domain controller for given domain.")
                end
@@ -648,6 +649,7 @@
                        Some (Auth_signature.Auth_service_error "The username 
or password is wrong.")
                end
                else if has_substr errmsg "0x400A" (* Unkown error *)
+                       or has_substr errmsg "(0xD)" (* ERROR_INVALID_DATA *)
                then begin (* this seems to be a non-admin valid user error... 
*)
                        Some (Auth_signature.Auth_service_error "Permission 
denied. The user has no administrator rights to disable the machine account in 
the Active Directory database.")
                end
1 file changed, 4 insertions(+), 2 deletions(-)
ocaml/auth/extauth_plugin_ADlikewise.ml |    6 ++++--

> -----Original Message-----
> From: xen-api-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-api-
> bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Marcus Granado
> Sent: 09 March 2010 13:04
> To: xen-api
> Subject: RE: [Xen-API] [PATCH] CA-38369: update meaning of 0x5, 0xD,
> 0x251E error codes from LW54
> 
> Please ignore this patch. I'll be sending another one shortly that
> doesn't modify the error strings, only the error codes.
> 
> > -----Original Message-----
> > From: xen-api-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-api-
> > bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Marcus Granado
> > Sent: 26 February 2010 18:31
> > To: xen-api
> > Subject: [Xen-API] [PATCH] CA-38369: update meaning of 0x5, 0xD,
> 0x251E
> > error codes from LW54
> >
> > # HG changeset patch
> > # User Marcus Granado <marcus.granado@xxxxxxxxxx>
> > # Date 1267208990 0
> > # Node ID 89fbc491696ac4e83ba9d029f41e16bd0b6e0819
> > # Parent  aebc9b3ce802446fb51cbdfb793ac970836558af
> > CA-38369: update meaning of 0x5, 0xD, 0x251E error codes from LW54
> >
> > Signed-off-by: Marcus Granado <marcus.granado@xxxxxxxxxxxxx>
> >
> > diff -r aebc9b3ce802 -r 89fbc491696a
> > ocaml/auth/extauth_plugin_ADlikewise.ml
> > --- a/ocaml/auth/extauth_plugin_ADlikewise.ml       Thu Feb 25 17:11:36
> > 2010 +0000
> > +++ b/ocaml/auth/extauth_plugin_ADlikewise.ml       Fri Feb 26 18:29:50
> > 2010 +0000
> > @@ -589,11 +589,12 @@
> >             then begin
> >                     raise (Auth_signature.Auth_service_error "The
> > username or password is wrong.")
> >             end
> > -           else if has_substr errmsg "0x5 " (* Unknown error *)
> > +           else if has_substr errmsg "(0x5)" (* Unknown error *)
> >             then begin (* this seems to be a not-enough-permission-to-
> > join-the-domain error *)
> > -                   raise (Auth_signature.Auth_service_error "Permission
> > denied. The user has no administrator rights to join the domain.")
> > +                   raise (Auth_signature.Auth_service_error "Permission
> > denied. The user cannot join the domain or to modify the machine
> > account in the Active Directory database.")
> >             end
> > -           else if has_substr errmsg "0x9CAC" (* Failed to lookup the
> > domain controller for given domain. *)
> > +           else if has_substr errmsg "0x9CAC" (* Failed to lookup the
> > domain controller for given domain. *)
> > +                   or has_substr errmsg "0x251E" (* DNS_ERROR_BAD_PACKET
> > *)
> >             then begin (* this seems to be a wrong domain controller
> > name error... *)
> >                     raise (Auth_signature.Auth_service_error "Failed to
> > lookup the domain controller for given domain.")
> >             end
> > @@ -645,11 +646,12 @@
> >      if has_substr errmsg "0x9C56" (* The password is incorrect for
> the
> > given username *)
> >        or has_substr errmsg "0x9C84" (* The user account is invalid *)
> >      then begin
> > -                   Some (Auth_signature.Auth_service_error "The username
> > or password is wrong.")
> > +                   Some (Auth_signature.Auth_service_error "The username
> > or password is wrong and did not disable the machine account in the
> > Active Directory database.")
> >             end
> >             else if has_substr errmsg "0x400A" (* Unkown error *)
> > +                   or has_substr errmsg "(0xD)" (* ERROR_INVALID_DATA *)
> >             then begin (* this seems to be a non-admin valid user
> > error... *)
> > -                   Some (Auth_signature.Auth_service_error "Permission
> > denied. The user has no administrator rights to disable the machine
> > account in the Active Directory database.")
> > +                   Some (Auth_signature.Auth_service_error "Permission
> > denied. The user cannot disable the machine account in the Active
> > Directory database.")
> >             end
> >             else begin (* general Likewise error *)
> >                     Some (Auth_signature.Auth_service_error errmsg)
> > 1 file changed, 7 insertions(+), 5 deletions(-)
> > ocaml/auth/extauth_plugin_ADlikewise.ml |   12 +++++++-----
> >
> 
> 
> _______________________________________________
> xen-api mailing list
> xen-api@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/mailman/listinfo/xen-api

Attachment: bin5Ce0PZuIWT.bin
Description: CA-38369-fix-errorcode-regression-in-xapi-with-LW54-during-domain-join-leave

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>