foreman_remote_execution_core 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: eca6ff4e60e56323032b2637ef2cb938e21ae852
|
4
|
+
data.tar.gz: 0b8b90235539506e27ff5d705b97900af87d6426
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0624be3a51b26d2d684ef1b5c66dee5a5e2537928d5859abfd74902254a3a578690849207ffec222b70f5e285e3121fec2c23ba4594acc28fd086846cc1499b3
|
7
|
+
data.tar.gz: c2418362fbadf0ff698ce22fa77fdfad8aae09feada70e35cc9a5eb9cf4e12cab51a1162b0b6dd44a7794e78407685c5efa0947c16a35effa119ad370cda5060
|
@@ -21,12 +21,16 @@ module ForemanRemoteExecutionCore
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def on_data(received_data, ssh_channel)
|
24
|
-
if received_data.match(
|
24
|
+
if received_data.match(login_prompt)
|
25
25
|
ssh_channel.send_data(effective_user_password + "\n")
|
26
26
|
@password_sent = true
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
def login_prompt
|
31
|
+
LOGIN_PROMPT
|
32
|
+
end
|
33
|
+
|
30
34
|
def filter_password?(received_data)
|
31
35
|
!@effective_user_password.empty? && @password_sent && received_data.match(@effective_user_password)
|
32
36
|
end
|
@@ -44,6 +48,18 @@ module ForemanRemoteExecutionCore
|
|
44
48
|
end
|
45
49
|
end
|
46
50
|
|
51
|
+
class DzdoUserMethod < SudoUserMethod
|
52
|
+
LOGIN_PROMPT = /password/i
|
53
|
+
|
54
|
+
def login_prompt
|
55
|
+
LOGIN_PROMPT
|
56
|
+
end
|
57
|
+
|
58
|
+
def cli_command_prefix
|
59
|
+
"dzdo -u #{effective_user} "
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
47
63
|
class SuUserMethod
|
48
64
|
attr_accessor :effective_user, :ssh_user
|
49
65
|
|
@@ -121,6 +137,9 @@ module ForemanRemoteExecutionCore
|
|
121
137
|
elsif effective_user_method == 'sudo'
|
122
138
|
SudoUserMethod.new(effective_user, ssh_user,
|
123
139
|
options.fetch(:secrets, {}).fetch(:sudo_password, nil))
|
140
|
+
elsif effective_user_method == 'dzdo'
|
141
|
+
DzdoUserMethod.new(effective_user, ssh_user,
|
142
|
+
options.fetch(:secrets, {}).fetch(:sudo_password, nil))
|
124
143
|
elsif effective_user_method == 'su'
|
125
144
|
SuUserMethod.new(effective_user, ssh_user)
|
126
145
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_remote_execution_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Nečas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman-tasks-core
|
@@ -56,7 +56,7 @@ files:
|
|
56
56
|
- lib/foreman_remote_execution_core/version.rb
|
57
57
|
homepage: https://github.com/theforeman/foreman_remote_execution
|
58
58
|
licenses:
|
59
|
-
-
|
59
|
+
- GPL-3.0
|
60
60
|
metadata: {}
|
61
61
|
post_install_message:
|
62
62
|
rdoc_options: []
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
76
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
77
|
+
rubygems_version: 2.6.12
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Foreman remote execution - core bits
|