Skip to content

Commit 2b05a48

Browse files
authored
Merge pull request #2629 from josh-feather/2621-only-run-icacls-on-win32
Restrict icacls excecution to Win32
2 parents 359936d + bfc6db1 commit 2b05a48

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

agent/agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,8 @@ def do_mkdtemp():
565565

566566
try:
567567
dirpath = tempfile.mkdtemp(suffix=suffix, prefix=prefix, dir=dirpath)
568-
subprocess.call(["icacls", dirpath, "/inheritance:e", "/grant", "BUILTIN\\Users:(OI)(CI)(RX)"])
568+
if sys.platform == "win32":
569+
subprocess.call(["icacls", dirpath, "/inheritance:e", "/grant", "BUILTIN\\Users:(OI)(CI)(RX)"])
569570
except Exception:
570571
return json_exception("Error creating temporary directory")
571572

0 commit comments

Comments
 (0)