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] Fix improper Secret log filtering in the CLI

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH] Fix improper Secret log filtering in the CLI
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Thu, 8 Jul 2010 11:21:13 +0100
Delivery-date: Thu, 08 Jul 2010 03:29:29 -0700
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
User-agent: Mercurial-patchbomb/1.4.3
# HG changeset patch
# User Magnus Therning <magnus.therning@xxxxxxxxxx>
# Date 1278584447 -3600
# Node ID 1aade1532deea9b779674b461dad428d2d64ff1d
# Parent  3c3b88da040b44c5f77fc344360e92343cded330
[CA-40987]: Fix improper Secret log filtering in the CLI.

Signed-off-by: Magnus Therning <magnus.therning@xxxxxxxxxx>

diff -r 3c3b88da040b -r 1aade1532dee ocaml/xapi/xapi_cli.ml
--- a/ocaml/xapi/xapi_cli.ml    Thu Jul 08 11:20:26 2010 +0100
+++ b/ocaml/xapi/xapi_cli.ml    Thu Jul 08 11:20:47 2010 +0100
@@ -154,8 +154,13 @@
   let rpc = Helpers.get_rpc () req s in
   Cli_frontend.populate_cmdtable rpc Ref.null;
   (* Log the actual CLI command to help diagnose failures like CA-25516 *)
-  debug "xe %s %s" (get_cmdname cmd) (String.concat " " (List.map (fun (k, v) 
-> let v' = if k = "password" then "(omitted)" else v in k ^ "=" ^ v') params));
-  if get_cmdname cmd = "help"
+  let cmd_name = get_cmdname cmd in
+  if String.startswith "secret-" cmd_name
+       then
+               debug "xe %s %s" cmd_name (String.concat " " (List.map (fun (k, 
v) -> let v' = if k = "value" then "(omitted)" else v in k ^ "=" ^ v') params))
+       else
+               debug "xe %s %s" cmd_name (String.concat " " (List.map (fun (k, 
v) -> k ^ "=" ^ v) params));
+  if cmd_name = "help"
   then do_help is_compat cmd minimal s 
   else do_rpcs req s u p minimal is_compat cmd session args
        
 ocaml/xapi/xapi_cli.ml |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


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] Fix improper Secret log filtering in the CLI, David Scott <=