Use --ro-bind-try for system files in whitelist mode
This commit is contained in:
@@ -82,16 +82,16 @@ fn add_whitelist_mode(cmd: &mut Command) -> Result<(), SandboxError> {
|
||||
cmd.args(["--ro-bind-try", path, path]);
|
||||
}
|
||||
|
||||
cmd.args(["--ro-bind", "/etc/ssl", "/etc/ssl"]);
|
||||
cmd.args(["--ro-bind-try", "/etc/ssl", "/etc/ssl"]);
|
||||
cmd.args([
|
||||
"--ro-bind-try",
|
||||
"/etc/ca-certificates",
|
||||
"/etc/ca-certificates",
|
||||
]);
|
||||
cmd.args(["--ro-bind", "/etc/resolv.conf", "/etc/resolv.conf"]);
|
||||
cmd.args(["--ro-bind", "/etc/nsswitch.conf", "/etc/nsswitch.conf"]);
|
||||
cmd.args(["--ro-bind", "/etc/passwd", "/etc/passwd"]);
|
||||
cmd.args(["--ro-bind", "/etc/group", "/etc/group"]);
|
||||
cmd.args(["--ro-bind-try", "/etc/resolv.conf", "/etc/resolv.conf"]);
|
||||
cmd.args(["--ro-bind-try", "/etc/nsswitch.conf", "/etc/nsswitch.conf"]);
|
||||
cmd.args(["--ro-bind-try", "/etc/passwd", "/etc/passwd"]);
|
||||
cmd.args(["--ro-bind-try", "/etc/group", "/etc/group"]);
|
||||
|
||||
for path in [
|
||||
"/etc/hosts",
|
||||
|
||||
Reference in New Issue
Block a user