smart_proxy_remote_execution_ssh 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c52e262769802ba7236ffa5735318502636db7b6e3b1aa95777c6538631987e
|
|
4
|
+
data.tar.gz: ac198f44a8933215b0e4e552d8fa19c5ea9fa441aaf92613e541912dc56abaed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04eccbae6f9bef0cb192432d68e788fad4c8a08b27ae917434bd9941a24857d0adc412e28161edba835526ee5fca2254572a03ec955d09103f955f58e73d765b
|
|
7
|
+
data.tar.gz: e9227de7f8ad2b7419184eac5c03c8710d0243aefea9a83e267fa07671bdacec5e03ee5162e65a48a93b3de21e123495e40e5f475781aa66e5f2e751ef818876
|
|
@@ -420,8 +420,13 @@ module Proxy::RemoteExecution::Ssh::Runners
|
|
|
420
420
|
end
|
|
421
421
|
|
|
422
422
|
def ensure_effective_user_access(*paths, mode: 'rx')
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
return if @user_method.is_a?(NoopUserMethod) || @user_method.effective_user == 'root'
|
|
424
|
+
|
|
425
|
+
paths_str = paths.join(' ')
|
|
426
|
+
if @user_method.ssh_user == 'root'
|
|
427
|
+
ensure_remote_command("chown #{@user_method.effective_user} #{paths_str} && chmod u=#{mode} #{paths_str}")
|
|
428
|
+
else
|
|
429
|
+
ensure_remote_command("setfacl -m u:#{@user_method.effective_user}:#{mode} #{paths_str}")
|
|
425
430
|
end
|
|
426
431
|
end
|
|
427
432
|
end
|