From 0c3b229a91550e90275e9444cc7a24e03adcbe42 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Wed, 7 Sep 2016 12:56:13 +0200 Subject: [PATCH] Bug #4761: Fix serverardmin login (one_auth_mad) --- src/authm_mad/one_auth_mad.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/authm_mad/one_auth_mad.rb b/src/authm_mad/one_auth_mad.rb index 907260db04..788d635a29 100755 --- a/src/authm_mad/one_auth_mad.rb +++ b/src/authm_mad/one_auth_mad.rb @@ -28,7 +28,6 @@ end $: << RUBY_LIB_LOCATION - require 'scripts_common' require 'OpenNebulaDriver' require 'getoptlong' @@ -45,7 +44,6 @@ class AuthDriver < OpenNebulaDriver :authZ => "AUTHORIZE" } - # Initialize an AuthDriver # # @param [String] the authorization method to be used, nil to use the @@ -85,13 +83,12 @@ class AuthDriver < OpenNebulaDriver end end - # Works the same as log_method but changes the password by '****'. # The last word is the password for authentication. def log_method_no_password(num, secret) - lambda {|message| + lambda {|message, all=true| m=message.gsub(/ #{Regexp.escape(secret)}$/, ' ****') - log(num, m) + log(num, m, all) } end @@ -128,7 +125,7 @@ class AuthDriver < OpenNebulaDriver rc = LocalCommand.run(command, log_method_no_password(request_id, Shellwords.escape(secret))) - result , info = get_info_from_execution(rc) + result, info = get_info_from_execution(rc) send_message(ACTION[:authN], result, request_id, info) end