From a951237e25ebb0b03e7fffc1864dee2bfe53a698 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Thu, 21 May 2026 12:35:22 +0000 Subject: [PATCH] test: adapt RPC test for restricted socket permissions The service socket now defaults to 0600 (owner-only). Since the test runs the setuid criu binary as a non-root user (uid 1000), the socket ends up owned by root. Chown the socket to the test user after service startup so it can connect, mirroring what an administrator would do in production. Assisted-by: Claude Code (claude-opus-4-6):claude-opus-4-6@default Generated with Claude Code (https://claude.ai/code) Signed-off-by: Adrian Reber --- test/others/rpc/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/others/rpc/Makefile b/test/others/rpc/Makefile index 1607779c4..17fabb695 100644 --- a/test/others/rpc/Makefile +++ b/test/others/rpc/Makefile @@ -32,6 +32,8 @@ run: all -d --pidfile pidfile -o service.log --status-fd 200; \ $(PYTHON) read.py build/status" rm -f build/status + @# Socket defaults to 0600; transfer ownership to the test user. + chown 1000:1000 build/criu_service.socket chmod a+rw build/pidfile sudo -g '#1000' -u '#1000' ./run.sh sudo -g '#1000' -u '#1000' ./version.py