You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Allow sandbox access to /dev/ptmx and /dev/ttys*
This allows Expect, which is sometimes needed to automate interaction with particularly pesky programs that require user input, to be used in a Portfile. https://lists.macports.org/pipermail/macports-dev/2018-April/038382.html
This commit is contained in:
@@ -90,6 +90,11 @@ proc portsandbox::set_profile {target} {
|
||||
(regex #\"^/dev/fd/\")) (allow file-write* \
|
||||
(regex #\"^(/private)?(/var)?/tmp/\" #\"^(/private)?/var/folders/\" #\"^(/private)?/var/db/mds/\"))"
|
||||
|
||||
# allow access to ptys
|
||||
append portsandbox_profile "\
|
||||
(allow file-write-data (regex #\"^/dev/ttys\") (literal \"/dev/ptmx\")) \
|
||||
(allow file-write-mode (regex #\"^/dev/ttys\"))"
|
||||
|
||||
set perms [list file-write*]
|
||||
if {${os.major} >= 17} {
|
||||
lappend perms file-write-setugid
|
||||
|
||||
Reference in New Issue
Block a user