File 0003-Fix-cib.xml-parsing-for-acl_version-bsc-1158681.patch of Package hawk2.13711
From 20cbdcced0892d18c519c4b2d14d51e412a707ec Mon Sep 17 00:00:00 2001
From: Ayoub Belarbi <ayoub-belarbi@users.noreply.github.com>
Date: Mon, 16 Dec 2019 15:20:55 +0100
Subject: [PATCH] Fix cib.xml parsing for acl_version (bsc#1158681)
---
hawk/lib/util.rb | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/hawk/lib/util.rb b/hawk/lib/util.rb
index 751f1209..a5399f7d 100644
--- a/hawk/lib/util.rb
+++ b/hawk/lib/util.rb
@@ -342,12 +342,7 @@ module Util
def acl_version
Rails.cache.fetch(:get_acl_version) do
- m = safe_x(
- '/usr/sbin/cibadmin',
- '-t', '5',
- '-Ql',
- '--xpath',
- '/cib[@validate-with]').lines.first.to_s.match(/validate-with=\"pacemaker-([0-9.]+)\"/)
+ m = `/usr/sbin/cibadmin -t 5 -Ql --xpath /cib[@validate-with]`.shellescape.lines.first.to_s.match(/validate-with=\"pacemaker-([0-9.]+)\"/)
return m.captures[0].to_f if m
2.0
end
--
2.16.4