diff mbox series

Allow UNIX socket for VNC websocket

Message ID 20230723210355.28717-1-sergii@zasenko.name
State New
Headers show
Series Allow UNIX socket for VNC websocket | expand

Commit Message

Sergii Zasenko July 23, 2023, 9:03 p.m. UTC
Signed-off-by: Sergii Zasenko <sergii@zasenko.name>
---
 ui/vnc.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

Marc-André Lureau July 24, 2023, 8:08 a.m. UTC | #1
Hi

Daniel, in commit 275e0d616b ("ui: refactor code for populating
SocketAddress from vnc_display_open"), you said "This refactoring also
removes the restriction that prevents enabling websockets when the plain
VNC server is listening on a UNIX socket.". But you didn't remove the
condition. I suppose it was a left-over?


On Mon, Jul 24, 2023 at 1:59 AM Sergii Zasenko <sergii@zasenko.name> wrote:

> Signed-off-by: Sergii Zasenko <sergii@zasenko.name>
>

lgtm
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>



> ---
>  ui/vnc.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 92964dc..dea1414 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -3715,11 +3715,6 @@ static int vnc_display_get_address(const char
> *addrstr,
>          addr->type = SOCKET_ADDRESS_TYPE_UNIX;
>          addr->u.q_unix.path = g_strdup(addrstr + 5);
>
> -        if (websocket) {
> -            error_setg(errp, "UNIX sockets not supported with websock");
> -            goto cleanup;
> -        }
> -
>          if (to) {
>              error_setg(errp, "Port range not support with UNIX socket");
>              goto cleanup;
> --
> 2.39.2
>
>
>
Daniel P. Berrangé July 24, 2023, 8:48 a.m. UTC | #2
On Mon, Jul 24, 2023 at 12:08:26PM +0400, Marc-André Lureau wrote:
> Hi
> 
> Daniel, in commit 275e0d616b ("ui: refactor code for populating
> SocketAddress from vnc_display_open"), you said "This refactoring also
> removes the restriction that prevents enabling websockets when the plain
> VNC server is listening on a UNIX socket.". But you didn't remove the
> condition. I suppose it was a left-over?

That commit was allowing the regular VNC port to be put on UNIX
socket, at the same time as WS was enabled, it wasn't trying to
put WS on a UNIX socket. Still I seee no reason to keep the
limitation.


With regards,
Daniel
Daniel P. Berrangé July 24, 2023, 8:49 a.m. UTC | #3
On Mon, Jul 24, 2023 at 12:03:56AM +0300, Sergii Zasenko wrote:
> Signed-off-by: Sergii Zasenko <sergii@zasenko.name>
> ---
>  ui/vnc.c | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 92964dc..dea1414 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -3715,11 +3715,6 @@ static int vnc_display_get_address(const char *addrstr,
>          addr->type = SOCKET_ADDRESS_TYPE_UNIX;
>          addr->u.q_unix.path = g_strdup(addrstr + 5);
>  
> -        if (websocket) {
> -            error_setg(errp, "UNIX sockets not supported with websock");
> -            goto cleanup;
> -        }
> -
>          if (to) {
>              error_setg(errp, "Port range not support with UNIX socket");
>              goto cleanup;

Missing docs update to qemu-options.hx to describe the permitted
syntax for the new feature.


With regards,
Daniel
diff mbox series

Patch

diff --git a/ui/vnc.c b/ui/vnc.c
index 92964dc..dea1414 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3715,11 +3715,6 @@  static int vnc_display_get_address(const char *addrstr,
         addr->type = SOCKET_ADDRESS_TYPE_UNIX;
         addr->u.q_unix.path = g_strdup(addrstr + 5);
 
-        if (websocket) {
-            error_setg(errp, "UNIX sockets not supported with websock");
-            goto cleanup;
-        }
-
         if (to) {
             error_setg(errp, "Port range not support with UNIX socket");
             goto cleanup;