Skip to content

Commit 6e18f7f

Browse files
author
Stefan Grönke + Igor Galić
committed
set /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin globally in Jail.env
1 parent ff689cc commit 6e18f7f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

libioc/Jail.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,6 +2175,14 @@ def env(self) -> typing.Dict[str, str]:
21752175

21762176
jail_env["IOC_JAIL_PATH"] = self.root_dataset.mountpoint
21772177
jail_env["IOC_JID"] = str(self.jid)
2178+
jail_env["PATH"] = ":".join((
2179+
"/sbin",
2180+
"/bin",
2181+
"/usr/sbin",
2182+
"/usr/bin",
2183+
"/usr/local/sbin",
2184+
"/usr/local/bin",
2185+
))
21782186

21792187
return jail_env
21802188

libioc/Provisioning/puppet.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,6 @@ def provision(
202202
)
203203

204204
try:
205-
env = {
206-
'PATH':
207-
'/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin'
208-
}
209205
puppet_dir = "/usr/local/etc/puppet"
210206
if self.source.remote is True:
211207

@@ -232,7 +228,7 @@ def provision(
232228
"deploy",
233229
"environment",
234230
"-pv"
235-
], env=env )
231+
])
236232
except Exception as e:
237233
yield r10kDeployEvent.fail(e)
238234
raise e
@@ -251,7 +247,7 @@ def provision(
251247
"--logdest",
252248
"syslog",
253249
f"{puppet_env_dir}/production/manifests/site.pp"
254-
], env=env)
250+
])
255251
yield puppetApplyEvent.end()
256252
except Exception as e:
257253
yield puppetApplyEvent.fail(e)

0 commit comments

Comments
 (0)