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-34859: use subject_username as fallback for subject

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] CA-34859: use subject_username as fallback for subject_displayname when subject_gecos is empty
From: Marcus Granado <marcus.granado@xxxxxxxxxx>
Date: Thu, 12 Nov 2009 13:51:26 +0000
Delivery-date: Thu, 12 Nov 2009 05:52:11 -0800
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
1 file changed, 5 insertions(+), 3 deletions(-)
ocaml/auth/extauth_plugin_ADlikewise.ml |    8 +++++---


# HG changeset patch
# User Marcus Granado <marcus.granado@xxxxxxxxxx>
# Date 1258033812 0
# Node ID 0d664aa678e6852959401a65346d1b328d808d65
# Parent  c0bad448cefcd8c14b2a344de0c379958645abe5
CA-34859: use subject_username as fallback for subject_displayname when 
subject_gecos is empty

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

diff -r c0bad448cefc -r 0d664aa678e6 ocaml/auth/extauth_plugin_ADlikewise.ml
--- a/ocaml/auth/extauth_plugin_ADlikewise.ml   Thu Nov 12 13:32:16 2009 +0000
+++ b/ocaml/auth/extauth_plugin_ADlikewise.ml   Thu Nov 12 13:50:12 2009 +0000
@@ -406,13 +406,15 @@
                        ("contains-byname", List.fold_left (fun (n,v) m 
->m^","^v) "" (List.filter (fun (n,v)->n="Member") infolist));*)
                ]
        else (* subject is user *)
-               [       ("subject-name", unmap_lw_space_chars (get_value "Name" 
infolist));
+               let subject_name = unmap_lw_space_chars (get_value "Name" 
infolist) in
+               let subject_gecos = get_value "Gecos" infolist in
+               [       ("subject-name", subject_name);
                        ("subject-upn", get_value "UPN" infolist);
                        ("subject-uid", get_value "Uid" infolist);
                        ("subject-gid", get_value "Gid" infolist);
                        ("subject-sid", get_value "SID" infolist);
-                       ("subject-gecos", get_value "Gecos" infolist);
-                       ("subject-displayname", get_value "Gecos" infolist);
+                       ("subject-gecos", subject_gecos);
+                       ("subject-displayname", if subject_gecos="" then 
subject_name else subject_gecos);
                        (*("subject-homedir", get_value "Home dir" infolist);*)
                        (*("subject-shell", get_value "Shell" infolist);*)
                        ("subject-is-group", "false");

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-34859: use subject_username as fallback for subject_displayname when subject_gecos is empty, Marcus Granado <=