Skip to content

Commit f125143

Browse files
Reepca Russelsteincivodul
Reepca Russelstein
authored andcommitted
build: Restrict access to daemon socket in tests.
With the weak isolation available to the test daemon, it is essential to disallow untrusted access to it, as otherwise another local user can gain our user's credentials easily. * build-aux/test-env.in: ensure the daemon-socket directory is freshly-created with 0700 permissions. Change-Id: I742f70fc6fc28e5b4dc88d590eef3daf1b964670 Signed-off-by: Ludovic Courtès <[email protected]>
1 parent c78f8f6 commit f125143

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build-aux/test-env.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ then
9797
GUIX_ALLOW_UNAUTHENTICATED_SUBSTITUTES \
9898
GUIX_CONFIGURATION_DIRECTORY XDG_CACHE_HOME
9999

100+
# Create a fresh directory with restrictive permissions so that our test
101+
# daemon's weak isolation can't be exploited by other users
102+
rm -rf "$GUIX_STATE_DIRECTORY/daemon-socket"
103+
mkdir -m 0700 "$GUIX_STATE_DIRECTORY/daemon-socket"
104+
100105
# Launch the daemon without chroot support because is may be
101106
# unavailable, for instance if we're not running as root.
102107
"@abs_top_builddir@/pre-inst-env" \

0 commit comments

Comments
 (0)