chef-winrm-elevated 1.2.4 → 1.2.5
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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2948749ef6e70631ef6b58ed1f945be2b56a63ba8192956ef80bf8313db04c84
|
4
|
+
data.tar.gz: 7bf32c92bfe809ddd85c8c1b32b545759594f3410397317d5ef380ff79a0c362
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e494971db0c775c641e9b59a32124a24d8988f72cc7b801ac9fa766aa8af3a88528642114ffce1747ec7b54037714779dedf4a18eb1632634eb9d2db2911e2ca
|
7
|
+
data.tar.gz: 9ac808c3323807d08611e819d9c77ec6f3e8accbe8112cd154104a9cdcef9dce33b5edf46e048800618388f460b141f43e11cdc8f2a1cb43cfb5a3ff0e4bd1db
|
data/README.md
CHANGED
@@ -5,8 +5,8 @@ This gem allows you to break out of the magical WinRM constraints thus allowing
|
|
5
5
|
|
6
6
|
## Running commands elevated
|
7
7
|
```ruby
|
8
|
-
require 'winrm'
|
9
|
-
require 'winrm-elevated'
|
8
|
+
require 'chef-winrm'
|
9
|
+
require 'chef-winrm-elevated'
|
10
10
|
|
11
11
|
conn = WinRM::Connection.new(...
|
12
12
|
conn.shell(:elevated) do |shell|
|
@@ -18,10 +18,10 @@ end
|
|
18
18
|
```
|
19
19
|
|
20
20
|
### Impersonating a service account
|
21
|
-
By passing a `nil` password, winrm-elevated will assume that the command should run as a service account:
|
21
|
+
By passing a `nil` password, chef-winrm-elevated will assume that the command should run as a service account:
|
22
22
|
```ruby
|
23
|
-
require 'winrm'
|
24
|
-
require 'winrm-elevated'
|
23
|
+
require 'chef-winrm'
|
24
|
+
require 'chef-winrm-elevated'
|
25
25
|
|
26
26
|
conn = WinRM::Connection.new(...
|
27
27
|
conn.shell(:elevated) do |shell|
|
@@ -37,8 +37,8 @@ end
|
|
37
37
|
### Using an interactive task
|
38
38
|
By setting `interactive_logon` to `true`, the scheduled task will be configured to use an interactive logon allowing all command activity to be viewable from a RDP session if logged on as the same user as the winrm credentials:
|
39
39
|
```ruby
|
40
|
-
require 'winrm'
|
41
|
-
require 'winrm-elevated'
|
40
|
+
require 'chef-winrm'
|
41
|
+
require 'chef-winrm-elevated'
|
42
42
|
|
43
43
|
conn = WinRM::Connection.new(...
|
44
44
|
conn.shell(:elevated) do |shell|
|
@@ -14,8 +14,8 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
|
16
16
|
require 'erubi'
|
17
|
-
require 'winrm' unless defined?(WinRM::Connection)
|
18
|
-
require 'winrm-fs'
|
17
|
+
require 'chef-winrm' unless defined?(WinRM::Connection)
|
18
|
+
require 'chef-winrm-fs'
|
19
19
|
require 'securerandom' unless defined?(SecureRandom)
|
20
20
|
require 'stringio'
|
21
21
|
|
@@ -72,7 +72,7 @@ module WinRM
|
|
72
72
|
private
|
73
73
|
|
74
74
|
def upload_elevated_shell_script(script_text)
|
75
|
-
elevated_shell_path = 'c:/windows/temp/winrm-elevated-shell-' + SecureRandom.uuid + '.ps1'
|
75
|
+
elevated_shell_path = 'c:/windows/temp/chef-winrm-elevated-shell-' + SecureRandom.uuid + '.ps1'
|
76
76
|
# Prepend the content of the file with an UTF-8 BOM for Windows to read it as such instead of the default
|
77
77
|
# Windows-XXXX encoding, and convert script_text accordingly if needed.
|
78
78
|
script_text_with_exit = "\uFEFF#{script_text.encode(Encoding::UTF_8)}\r\n$Host.SetShouldExit($LASTEXITCODE)"
|
@@ -81,7 +81,7 @@ module WinRM
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def elevated_shell_script_content
|
84
|
-
IO.read(File.expand_path('../../winrm-elevated/scripts/elevated_shell.ps1', __dir__))
|
84
|
+
IO.read(File.expand_path('../../chef-winrm-elevated/scripts/elevated_shell.ps1', __dir__))
|
85
85
|
end
|
86
86
|
|
87
87
|
def wrap_in_scheduled_task(script_path, username, password)
|
@@ -13,5 +13,5 @@
|
|
13
13
|
# See the License for the specific language governing permissions and
|
14
14
|
# limitations under the License.
|
15
15
|
|
16
|
-
require 'winrm' unless defined?(WinRM::Connection)
|
17
|
-
require_relative 'winrm/shells/elevated'
|
16
|
+
require 'chef-winrm' unless defined?(WinRM::Connection)
|
17
|
+
require_relative 'chef-winrm/shells/elevated'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-winrm-elevated
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shawn Neal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-winrm
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.3.
|
19
|
+
version: 2.3.11
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.3.
|
26
|
+
version: 2.3.11
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: chef-winrm-fs
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.3.7
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.3.7
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: erubi
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,10 +120,10 @@ extra_rdoc_files:
|
|
120
120
|
files:
|
121
121
|
- LICENSE
|
122
122
|
- README.md
|
123
|
-
- lib/winrm-elevated.rb
|
124
|
-
- lib/winrm-elevated/scripts/elevated_shell.ps1
|
125
|
-
- lib/winrm/shells/elevated.rb
|
126
|
-
homepage: https://github.com/
|
123
|
+
- lib/chef-winrm-elevated.rb
|
124
|
+
- lib/chef-winrm-elevated/scripts/elevated_shell.ps1
|
125
|
+
- lib/chef-winrm/shells/elevated.rb
|
126
|
+
homepage: https://github.com/chef/chef-winrm-elevated
|
127
127
|
licenses:
|
128
128
|
- Apache-2.0
|
129
129
|
metadata: {}
|
File without changes
|