mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-27 11:32:21 +02:00
guix-daemon: Disable garbage collection for remote connections.
* nix/nix-daemon/nix-daemon.cc (isRemoteConnection): New variable. (performOp): For wopCollectGarbage, throw an error when isRemoteConnection is set. (acceptConnection): Set isRemoteConnection when connection is not AF_UNIX. * tests/guix-daemon.sh: Add a test for the new behavior.
This commit is contained in:
@@ -194,6 +194,20 @@ do
|
||||
kill "$daemon_pid"
|
||||
done
|
||||
|
||||
# Make sure garbage collection from a TCP connection does not work.
|
||||
|
||||
tcp_socket="127.0.0.1:9999"
|
||||
guix-daemon --listen="$tcp_socket" &
|
||||
daemon_pid=$!
|
||||
|
||||
GUIX_DAEMON_SOCKET="guix://$tcp_socket"
|
||||
export GUIX_DAEMON_SOCKET
|
||||
|
||||
if guix gc; then false; else true; fi
|
||||
|
||||
unset GUIX_DAEMON_SOCKET
|
||||
kill "$daemon_pid"
|
||||
|
||||
# Log compression.
|
||||
|
||||
guix-daemon --listen="$socket" --disable-chroot --debug --log-compression=gzip &
|
||||
|
||||
Reference in New Issue
Block a user