mirror of
https://github.com/9001/copyparty.git
synced 2026-08-13 13:53:06 -06:00
docker blocks bwrap
This commit is contained in:
parent
68568b7743
commit
db68353e22
|
|
@ -1651,7 +1651,7 @@ def add_safety(ap):
|
||||||
th_bwrap = ""
|
th_bwrap = ""
|
||||||
if HAVE_BWRAP:
|
if HAVE_BWRAP:
|
||||||
zsl = [
|
zsl = [
|
||||||
"bwrap",
|
HAVE_BWRAP,
|
||||||
"--proc /proc",
|
"--proc /proc",
|
||||||
"--tmpfs /tmp",
|
"--tmpfs /tmp",
|
||||||
"--tmpfs /var",
|
"--tmpfs /var",
|
||||||
|
|
@ -1711,6 +1711,9 @@ def add_safety(ap):
|
||||||
ap2.add_argument("--acam", metavar="V[,V]", type=u, default="GET,HEAD", help="Access-Control-Allow-Methods; list of methods to accept from offsite ('*' behaves like \033[33m--acao\033[0m's description)")
|
ap2.add_argument("--acam", metavar="V[,V]", type=u, default="GET,HEAD", help="Access-Control-Allow-Methods; list of methods to accept from offsite ('*' behaves like \033[33m--acao\033[0m's description)")
|
||||||
if not ANYWIN and not UNIX:
|
if not ANYWIN and not UNIX:
|
||||||
ap2.add_argument("--th-bwrap", metavar="CMD", type=u, default=th_bwrap, help="optional bwrap sandbox command for FFmpeg and dcraw (Linux-only)")
|
ap2.add_argument("--th-bwrap", metavar="CMD", type=u, default=th_bwrap, help="optional bwrap sandbox command for FFmpeg and dcraw (Linux-only)")
|
||||||
|
ap2.add_argument("--use-bwrap", metavar="C", type=u, default="a", help="a/n/f; [\033[32ma\033[0m]=auto (yes if the program 'bwrap' exists (assumes it works)), [\033[32mn\033[0m]=no (assumes bwrap is broken), [\033[32mf\033[0m]=force (disables FFmpeg if bwrap unavailable)")
|
||||||
|
else:
|
||||||
|
ap2.add_argument("--use-bwrap", metavar="C", type=u, default="n", help=argparse.SUPPRESS)
|
||||||
|
|
||||||
|
|
||||||
def add_salt(ap, fk_salt, dk_salt, ah_salt):
|
def add_salt(ap, fk_salt, dk_salt, ah_salt):
|
||||||
|
|
|
||||||
|
|
@ -1188,6 +1188,17 @@ class SvcHub(object):
|
||||||
al.th_covers_set = set(al.th_covers)
|
al.th_covers_set = set(al.th_covers)
|
||||||
al.th_coversd_set = set(al.th_coversd)
|
al.th_coversd_set = set(al.th_coversd)
|
||||||
|
|
||||||
|
zs = al.use_bwrap.strip().lower()
|
||||||
|
if zs == "a":
|
||||||
|
if not HAVE_BWRAP:
|
||||||
|
al.th_bwrap = ""
|
||||||
|
elif zs == "n":
|
||||||
|
al.th_bwrap = ""
|
||||||
|
elif zs == "f":
|
||||||
|
al.th_bwrap = al.th_bwrap or "bwrap-not-available"
|
||||||
|
else:
|
||||||
|
raise Exception("--use-bwrap must be a/n/f")
|
||||||
|
|
||||||
for k in "c".split(" "):
|
for k in "c".split(" "):
|
||||||
if self.args.env_expand in (0, 2):
|
if self.args.env_expand in (0, 2):
|
||||||
break
|
break
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ cat >initcfg <<'EOF'
|
||||||
[global]
|
[global]
|
||||||
chdir: /w
|
chdir: /w
|
||||||
no-crt
|
no-crt
|
||||||
|
use-bwrap: n
|
||||||
|
|
||||||
% /cfg
|
% /cfg
|
||||||
EOF
|
EOF
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue