[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH] CA-37980: report error in audit-log for asynchronous tasks
# HG changeset patch # User Marcus Granado <marcus.granado@xxxxxxxxxx> # Date 1266586966 0 # Node ID c6a7cf573eb3b28e3a93569effaf736acca28744 # Parent 6927aee64f889d7f616f8bf77a9e68eb8cd88a94 CA-37980: report error in audit-log for asynchronous tasks Signed-off-by: Marcus Granado <marcus.granado@xxxxxxxxxxxxx> diff -r 6927aee64f88 -r c6a7cf573eb3 ocaml/idl/ocaml_backend/gen_server.ml --- a/ocaml/idl/ocaml_backend/gen_server.ml Wed Feb 17 17:47:30 2010 +0000 +++ b/ocaml/idl/ocaml_backend/gen_server.ml Fri Feb 19 13:42:46 2010 +0000 @@ -159,10 +159,12 @@ 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 key_names = "^(List.fold_right (fun arg args -> "\""^arg^"\"::"^args) (List.map (fun (k,_)->k) x.msg_map_keys_roles) "[]")^" in"; - "Rbac.check session_id __call ~args:(arg_names,__params) ~keys:key_names ~__context ~fn:(fun ()-> (*RBAC-BEGIN*)"] - else [] + "let rbac __context fn = Rbac.check session_id __call ~args:(arg_names,__params) ~keys:key_names ~__context ~fn in"] + else [ + "let rbac __context fn = fn() in" + ] in - let rbac_check_end = if has_session_arg then [") (*RBAC-END*)"] else [] in + let rbac_check_end = if has_session_arg then [] else [] in let unmarshall_code = ( (* If we're a constructor then unmarshall all the fields from the constructor record, passed as a struct *) @@ -211,13 +213,13 @@ let common_let_decs = [ "let marshaller = "^result_marshaller^" in"; - "let local_op = fun ~__context ->("^module_prefix^"."^impl_fn^") in"; + "let local_op = fun ~__context ->(rbac __context (fun()->("^module_prefix^"."^impl_fn^"))) in"; "let supports_async = "^(if has_async then "true" else "false")^" in"; "let generate_task_for = "^(string_of_bool (not (List.mem obj.name DM.no_task_id_for)))^" in" ] in let side_effect_let_decs = if Gen_empty_custom.operation_requires_side_effect x then [ - Printf.sprintf "let forward_op = fun ~local_fn ~__context -> (%s.%s) in" _forward impl_fn + Printf.sprintf "let forward_op = fun ~local_fn ~__context -> (rbac __context (fun()-> (%s.%s) )) in" _forward impl_fn ] else [ 1 file changed, 7 insertions(+), 5 deletions(-) ocaml/idl/ocaml_backend/gen_server.ml | 12 +++++++----- Attachment:
xen-api.hg.patch _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |