[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH] CA-37971: expand default_args elements into arg_names



# 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.