sanebox: remove --sanebox-cache-symlink flag
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
, allowedPaths ? []
|
, allowedPaths ? []
|
||||||
, allowedHomePaths ? []
|
, allowedHomePaths ? []
|
||||||
, allowedRunPaths ? []
|
, allowedRunPaths ? []
|
||||||
, symlinkCache ? {}
|
|
||||||
, autodetectCliPaths ? false
|
, autodetectCliPaths ? false
|
||||||
, capabilities ? []
|
, capabilities ? []
|
||||||
, dns ? null
|
, dns ? null
|
||||||
@@ -18,13 +17,6 @@ let
|
|||||||
];
|
];
|
||||||
allowPaths = flavor: paths: lib.flatten (builtins.map (allowPath flavor) paths);
|
allowPaths = flavor: paths: lib.flatten (builtins.map (allowPath flavor) paths);
|
||||||
|
|
||||||
cacheLink = from: to: [
|
|
||||||
"--sanebox-cache-symlink"
|
|
||||||
from
|
|
||||||
to
|
|
||||||
];
|
|
||||||
cacheLinks = links: lib.flatten (lib.mapAttrsToList cacheLink links);
|
|
||||||
|
|
||||||
capabilityFlags = lib.flatten (builtins.map (c: [ "--sanebox-cap" c ]) capabilities);
|
capabilityFlags = lib.flatten (builtins.map (c: [ "--sanebox-cap" c ]) capabilities);
|
||||||
|
|
||||||
netItems = lib.optionals (netDev != null) [
|
netItems = lib.optionals (netDev != null) [
|
||||||
@@ -48,5 +40,4 @@ in
|
|||||||
++ capabilityFlags
|
++ capabilityFlags
|
||||||
++ lib.optionals (autodetectCliPaths != null) [ "--sanebox-autodetect" autodetectCliPaths ]
|
++ lib.optionals (autodetectCliPaths != null) [ "--sanebox-autodetect" autodetectCliPaths ]
|
||||||
++ lib.optionals whitelistPwd [ "--sanebox-add-pwd" ]
|
++ lib.optionals whitelistPwd [ "--sanebox-add-pwd" ]
|
||||||
++ cacheLinks symlinkCache
|
|
||||||
++ extraConfig
|
++ extraConfig
|
||||||
|
@@ -123,9 +123,6 @@ usage() {
|
|||||||
echo ' allow access to the host <path>, relative to XDG_RUNTIME_DIR'
|
echo ' allow access to the host <path>, relative to XDG_RUNTIME_DIR'
|
||||||
echo ' --sanebox-add-pwd'
|
echo ' --sanebox-add-pwd'
|
||||||
echo ' shorthand for `--sanebox-path $PWD`'
|
echo ' shorthand for `--sanebox-path $PWD`'
|
||||||
echo ' --sanebox-cache-symlink <from> <to>'
|
|
||||||
echo ' assume that <from> is a symlink to <to>'
|
|
||||||
echo ' performance optimization to avoid spawning a readlink subshell'
|
|
||||||
echo
|
echo
|
||||||
echo 'the following environment variables are also considered and propagated to children:'
|
echo 'the following environment variables are also considered and propagated to children:'
|
||||||
echo ' SANEBOX_DISABLE=1'
|
echo ' SANEBOX_DISABLE=1'
|
||||||
@@ -526,14 +523,6 @@ parseArgs() {
|
|||||||
(--sanebox-add-pwd)
|
(--sanebox-add-pwd)
|
||||||
paths+=("$PWD")
|
paths+=("$PWD")
|
||||||
;;
|
;;
|
||||||
(--sanebox-cache-symlink)
|
|
||||||
local from="$1"
|
|
||||||
shift
|
|
||||||
local to="$1"
|
|
||||||
shift
|
|
||||||
relativeToPwd _absFrom "$from"
|
|
||||||
linkCache["$_absFrom"]="$to"
|
|
||||||
;;
|
|
||||||
(*)
|
(*)
|
||||||
parseArgsExtra+=("$arg")
|
parseArgsExtra+=("$arg")
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user