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-37971: expand default_args elements into arg_names

To: xen-api <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] CA-37971: expand default_args elements into arg_names
From: Marcus Granado <marcus.granado@xxxxxxxxxx>
Date: Tue, 23 Feb 2010 14:38:07 +0000
Delivery-date: Tue, 23 Feb 2010 06:37:42 -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
# HG changeset patch
# User Marcus Granado <marcus.granado@xxxxxxxxxx>
# Date 1266935780 0
# Node ID 2a49ffe25fef2c79982cfe10081e41c6ab2471ee
# Parent  3f967a4cfdc6de93bf2b943df0467447bef489f0
CA-37971: expand default_args elements into arg_names

in order to match the number of api call argument names and values in the audit 
log record.

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

diff -r 3f967a4cfdc6 -r 2a49ffe25fef ocaml/idl/ocaml_backend/gen_server.ml
--- a/ocaml/idl/ocaml_backend/gen_server.ml     Fri Feb 19 17:50:20 2010 +0000
+++ b/ocaml/idl/ocaml_backend/gen_server.ml     Tue Feb 23 14:36:20 2010 +0000
@@ -157,7 +157,7 @@
   in
   let rbac_check_begin = if has_session_arg
     then [
-                       "let arg_names = "^(List.fold_right (fun arg args -> 
"\""^arg^"\"::"^args) string_args (if is_non_constructor_with_defaults then 
"\"default_args\"::[]" else "[]"))^" in";
+                       "let arg_names = "^(List.fold_right (fun arg args -> 
"\""^arg^"\"::"^args) string_args (if is_non_constructor_with_defaults then 
((List.fold_right (fun dp ss->"\""^(dp.DT.param_name)^"\"::"^ss) 
msg_params_with_default_values "")^"[]") else "[]"))^" in";
                        "let key_names = "^(List.fold_right (fun arg args -> 
"\""^arg^"\"::"^args) (List.map (fun (k,_)->k) x.msg_map_keys_roles) "[]")^" 
in";
                        "let rbac __context fn = Rbac.check session_id __call 
~args:(arg_names,__params) ~keys:key_names ~__context ~fn in"]
     else [
1 file changed, 1 insertion(+), 1 deletion(-)
ocaml/idl/ocaml_backend/gen_server.ml |    2 +-


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-37971: expand default_args elements into arg_names, Marcus Granado <=