Skip to content
  • Daniel P. Berrangé's avatar
    73564c40
    io: ensure UNIX client doesn't unlink server socket · 73564c40
    Daniel P. Berrangé authored
    
    
    The qio_channel_socket_close method for was mistakenly unlinking the
    UNIX server socket, even if the channel was a client connection. This
    was not noticed with chardevs, since they never call close, but with the
    VNC server, this caused the VNC server socket to be deleted after the
    first client quit.
    
    The qio_channel_socket_close method also needlessly reimplemented the
    logic that already exists in socket_listen_cleanup(). Just call that
    method directly, for listen sockets only.
    
    This fixes a regression introduced in QEMU 3.0.0 with
    
      commit d66f78e1
      Author: Pavel Balaev <mail@void.so>
      Date:   Mon May 21 19:17:35 2018 +0300
    
        Delete AF_UNIX socket after close
    
    Fixes launchpad #1795100
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
    73564c40
    io: ensure UNIX client doesn't unlink server socket
    Daniel P. Berrangé authored
    
    
    The qio_channel_socket_close method for was mistakenly unlinking the
    UNIX server socket, even if the channel was a client connection. This
    was not noticed with chardevs, since they never call close, but with the
    VNC server, this caused the VNC server socket to be deleted after the
    first client quit.
    
    The qio_channel_socket_close method also needlessly reimplemented the
    logic that already exists in socket_listen_cleanup(). Just call that
    method directly, for listen sockets only.
    
    This fixes a regression introduced in QEMU 3.0.0 with
    
      commit d66f78e1
      Author: Pavel Balaev <mail@void.so>
      Date:   Mon May 21 19:17:35 2018 +0300
    
        Delete AF_UNIX socket after close
    
    Fixes launchpad #1795100
    
    Reviewed-by: default avatarEric Blake <eblake@redhat.com>
    Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Loading