mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
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 <areber@redhat.com>
This commit is contained in:
parent
339db9fd46
commit
a951237e25
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue