File: explicitly-specify-path-one-remote-side.patch

package info (click to toggle)
cdist 7.0.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,992 kB
  • sloc: sh: 16,815; python: 9,199; makefile: 344; awk: 261
file content (23 lines) | stat: -rw-r--r-- 941 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Dmitry Bogatov <KAction@gnu.org>
Date: Sun, 28 Jan 2018 15:46:31 +0300
Subject: Explicitly specify PATH one remote side

This patch solves issue, when remote side uses dropbear ssh server,
which do not treat root specially, resulting ldconfig(8) missing in
PATH.
---
 cdist/exec/remote.py | 1 +
 1 file changed, 1 insertion(+)

Index: cdist/cdist/exec/remote.py
===================================================================
--- cdist.orig/cdist/exec/remote.py
+++ cdist/cdist/exec/remote.py
@@ -262,6 +262,7 @@ class Remote:
         if env:
             remote_env = [" export {env[0]}={env[1]};".format(env=item)
                           for item in env.items()]
+            remote_env += [" export PATH=/bin:/usr/bin:/sbin:/usr/sbin;"]
             string_cmd = ("/bin/sh -c '{}{}'").format(" ".join(remote_env),
                                                       " ".join(command))
             cmd.append(string_cmd)