mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
wrapper-manager/sandboxing/bubblewrap: fix escaping arguments and launcher
The makeWrapper arguments are not escaped anymore for the binary wrapper that automatically does this anyways.
This commit is contained in:
parent
11e2ae7e33
commit
11e7d52350
@ -89,9 +89,9 @@ in
|
|||||||
if metadata.action == "unset" then
|
if metadata.action == "unset" then
|
||||||
"--unsetenv ${var}"
|
"--unsetenv ${var}"
|
||||||
else if lib.elem metadata.action [ "prefix" "suffix" ] then
|
else if lib.elem metadata.action [ "prefix" "suffix" ] then
|
||||||
"--setenv ${lib.escapeShellArg var} ${lib.escapeShellArg (lib.concatStringsSep metadata.separator metadata.value)}"
|
"--setenv ${var} ${lib.concatStringsSep metadata.separator metadata.value}"
|
||||||
else
|
else
|
||||||
"--setenv ${lib.escapeShellArg var} ${lib.escapeShellArg metadata.value}")
|
"--setenv ${var} ${metadata.value}")
|
||||||
env';
|
env';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -219,8 +219,8 @@ in
|
|||||||
let
|
let
|
||||||
makeFilesystemArgs = _: metadata:
|
makeFilesystemArgs = _: metadata:
|
||||||
let
|
let
|
||||||
src = lib.escapeShellArg metadata.source;
|
src = metadata.source;
|
||||||
dst = lib.escapeShellArg metadata.destination;
|
dst = metadata.destination;
|
||||||
hasPermissions = metadata.permissions != null;
|
hasPermissions = metadata.permissions != null;
|
||||||
isValidOperationWithPerms = lib.elem metadata.operation fileOperationsWithPerms;
|
isValidOperationWithPerms = lib.elem metadata.operation fileOperationsWithPerms;
|
||||||
in
|
in
|
||||||
@ -246,7 +246,7 @@ in
|
|||||||
let
|
let
|
||||||
closurePaths = getClosurePaths submoduleCfg.sharedNixPaths;
|
closurePaths = getClosurePaths submoduleCfg.sharedNixPaths;
|
||||||
in
|
in
|
||||||
builtins.map (p: "--ro-bind ${lib.escapeShellArg p} ${lib.escapeShellArg p}") closurePaths;
|
builtins.map (p: "--ro-bind ${p} ${p}") closurePaths;
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
@ -51,7 +51,7 @@ case "$(uname)" in
|
|||||||
|
|
||||||
for sysfs_dir in /sys/{block,bus,class,dev,devices}; do
|
for sysfs_dir in /sys/{block,bus,class,dev,devices}; do
|
||||||
if [[ -r "$sysfs_dir" ]] && [[ -x "$sysfs_dir" ]]; then
|
if [[ -r "$sysfs_dir" ]] && [[ -x "$sysfs_dir" ]]; then
|
||||||
additional_flags+=(--ro-bind "${sysfs_dir}")
|
additional_flags+=(--ro-bind "${sysfs_dir}" "${sysfs_dir}")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user