Compare commits

..

1 Commits

Author SHA1 Message Date
75c260cd8d
container: optionally isolate host abstract UNIX domain sockets via landlock
All checks were successful
Test / Create distribution (push) Successful in 37s
Test / Create distribution (pull_request) Successful in 26s
Test / Sandbox (push) Successful in 2m17s
Test / Sandbox (pull_request) Successful in 2m15s
Test / Hakurei (push) Successful in 3m10s
Test / Hakurei (pull_request) Successful in 3m7s
Test / Hpkg (pull_request) Successful in 3m41s
Test / Hpkg (push) Successful in 4m19s
Test / Sandbox (race detector) (push) Successful in 4m29s
Test / Sandbox (race detector) (pull_request) Successful in 4m23s
Test / Hakurei (race detector) (push) Successful in 4m57s
Test / Hakurei (race detector) (pull_request) Successful in 4m54s
Test / Flake checks (push) Successful in 1m27s
Test / Flake checks (pull_request) Successful in 1m27s
2025-08-18 16:18:36 +09:00
6 changed files with 30 additions and 13 deletions

View File

@ -62,7 +62,6 @@ var testCasesPd = []sealTestCase{
Remount(m("/"), syscall.MS_RDONLY), Remount(m("/"), syscall.MS_RDONLY),
SeccompPresets: seccomp.PresetExt | seccomp.PresetDenyDevel, SeccompPresets: seccomp.PresetExt | seccomp.PresetDenyDevel,
HostNet: true, HostNet: true,
HostAbstract: true,
RetainSession: true, RetainSession: true,
ForwardCancel: true, ForwardCancel: true,
}, },
@ -204,7 +203,6 @@ var testCasesPd = []sealTestCase{
Remount(m("/"), syscall.MS_RDONLY), Remount(m("/"), syscall.MS_RDONLY),
SeccompPresets: seccomp.PresetExt | seccomp.PresetDenyDevel, SeccompPresets: seccomp.PresetExt | seccomp.PresetDenyDevel,
HostNet: true, HostNet: true,
HostAbstract: true,
RetainSession: true, RetainSession: true,
ForwardCancel: true, ForwardCancel: true,
}, },

View File

@ -240,7 +240,6 @@ func (seal *outcome) finalise(ctx context.Context, sys sys.State, config *hst.Co
conf := &hst.ContainerConfig{ conf := &hst.ContainerConfig{
Userns: true, Userns: true,
Net: true, Net: true,
Abstract: true,
Tty: true, Tty: true,
AutoEtc: true, AutoEtc: true,

View File

@ -132,12 +132,12 @@ in
devel devel
userns userns
net net
abstract
device device
tty tty
multiarch multiarch
env env
; ;
scope_abstract = app.scopeAbstract;
map_real_uid = app.mapRealUid; map_real_uid = app.mapRealUid;
filesystem = filesystem =

View File

@ -572,6 +572,28 @@ boolean
*Example:*
` true `
## environment\.hakurei\.apps\.\<name>\.scopeAbstract
Whether to restrict abstract UNIX domain socket access\.
*Type:*
boolean
*Default:*
` true `
*Example:* *Example:*
` true ` ` true `

View File

@ -182,7 +182,9 @@ in
net = mkEnableOption "network access" // { net = mkEnableOption "network access" // {
default = true; default = true;
}; };
abstract = mkEnableOption "abstract unix domain socket access"; scopeAbstract = mkEnableOption "abstract unix domain socket access" // {
default = true;
};
nix = mkEnableOption "nix daemon access"; nix = mkEnableOption "nix daemon access";
mapRealUid = mkEnableOption "mapping to priv-user uid"; mapRealUid = mkEnableOption "mapping to priv-user uid";

View File

@ -194,9 +194,5 @@
]; ];
seccomp = true; seccomp = true;
try_socket = "/tmp/.X11-unix/X0";
socket_abstract = true;
socket_pathname = false;
}; };
} }