From 8c415d1fd9c8f2831d6353cc89b142cac470d449 Mon Sep 17 00:00:00 2001 From: Marcus Granado Date: Tue, 12 Oct 2010 11:55:03 +0100 Subject: [PATCH] CA-43936: dont try to get auth-user-name under local-session/emergency-mode Signed-off-by: Marcus Granado --- ocaml/idl/ocaml_backend/rbac_audit.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ocaml/idl/ocaml_backend/rbac_audit.ml b/ocaml/idl/ocaml_backend/rbac_audit.ml index 4483f0c4..5164811c 100644 --- a/ocaml/idl/ocaml_backend/rbac_audit.ml +++ b/ocaml/idl/ocaml_backend/rbac_audit.ml @@ -82,7 +82,12 @@ let get_subject_name __context session_id = get_subject_common ~__context ~session_id ~fnname:"get_subject_name" ~fn_if_local_session:(fun()-> - DB_Action.Session.get_auth_user_name ~__context ~self:session_id + (* we are in emergency mode here, do not call DB_Action: + - local sessions are not in the normal DB + - local sessions do not have a username field + - DB_Action will block forever trying to access an inaccessible master + *) + "" ) ~fn_if_local_superuser:(fun()-> DB_Action.Session.get_auth_user_name ~__context ~self:session_id -- 2.39.5