Re: [Spice-devel] [PATCH spice-server] reds: Remove stream watch handling link in a single place

2017-12-19 Thread Frediano Ziglio
> > Hi Frediano, > > Note that there still is another call to red_stream_remove_watch, > (in reds_handle_ssl_accept), so consider changing the subject. > Yes, but this one is not handling link but SSL/TLS. > One comment below. > > > On 12/19/2017 03:38 PM, Frediano Ziglio wrote: > > Signed-o

Re: [Spice-devel] [nsis v3 2/2] build: Don't add .pdb debug files to the installer

2017-12-19 Thread Frediano Ziglio
> > The .pdb files contain the debug information for the drivers. They > increase significantly the size of the installer, so it's better not to > ship them. On the other side bug report will contain much less informations. Not really sure about it. > --- > Makefile | 2 +- > 1 file changed, 1

Re: [Spice-devel] [nsis v3 1/2] Properly quote path to service binaries

2017-12-19 Thread Frediano Ziglio
> > If these paths are unquoted, and the path contains spaces (C:\Program > Files (x86)\...), this could be exploited by putting a binary with a > crafted name (C:\Program.exe), leading to privilege escalation as this > is a service that is being started. > > https://www.commonexploits.com/unquot

Re: [Spice-devel] [PATCH spice-server] main-channel-client: Do not call red_channel_client_begin_send_message if we are not sending a message

2017-12-19 Thread Christophe Fergeau
On Tue, Dec 19, 2017 at 11:38:26AM +, Frediano Ziglio wrote: > In case mcc->priv->initial_channels_list_sent is false we didn't > marshall any message so we should not call > red_channel_client_begin_send_message. > > Signed-off-by: Frediano Ziglio > --- > server/main-channel-client.c | 3 ++

Re: [Spice-devel] [PATCH spice-server 11/11] inputs-channel: Move spice_server_kbd_leds to InputsChannel

2017-12-19 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Dec 11, 2017 at 10:28:08AM +, Frediano Ziglio wrote: > This avoids to expose some detail about the channel. > Like other APIs implement it move close to the part that handle > it instead of have everything in reds.c. > > Signed-off-by: Frediano Ziglio >

Re: [Spice-devel] [PATCH spice-server 07/11] red-stream: Use mechname for mechname

2017-12-19 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Dec 11, 2017 at 10:28:04AM +, Frediano Ziglio wrote: > There's no reason to copy mechname into mechlist to use mechlist > instead of mechname. > > Signed-off-by: Frediano Ziglio > --- > server/red-stream.c | 7 ++- > 1 file changed, 2 insertions(+),

Re: [Spice-devel] [PATCH spice-server 06/11] red-stream: Remove SASL "data" field leak

2017-12-19 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Dec 11, 2017 at 10:28:03AM +, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > server/red-stream.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/server/red-stream.c b/server/red-stream.c > index 45e92a57..5ddf8c54 100644 > ---

Re: [Spice-devel] [PATCH spice-server 05/11] reds: Remove argument from reds_handle_link

2017-12-19 Thread Christophe Fergeau
Acked-by: Christophe Fergeau On Mon, Dec 11, 2017 at 10:28:02AM +, Frediano Ziglio wrote: > RedLinkInfo stores reds in it no need to pass every time. > > Signed-off-by: Frediano Ziglio > --- > server/reds.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --

Re: [Spice-devel] [PATCH spice-server 10/11] red-stream: Avoid useless copy of mechlist

2017-12-19 Thread Frediano Ziglio
> > On Mon, Dec 11, 2017 at 10:28:07AM +, Frediano Ziglio wrote: > > The list will persist will the SASL connection is not disposed > > (or another sasl_listmech called). > > Where is this documented? > "while the SASL connection.." > > Yes, "will" typo. Is documented in sasl.h: * result

Re: [Spice-devel] [PATCH spice-server 10/11] red-stream: Avoid useless copy of mechlist

2017-12-19 Thread Christophe Fergeau
On Mon, Dec 11, 2017 at 10:28:07AM +, Frediano Ziglio wrote: > The list will persist will the SASL connection is not disposed > (or another sasl_listmech called). Where is this documented? "while the SASL connection.." signature.asc Description: PGP signature ___

Re: [Spice-devel] [PATCH spice-server] reds: Remove stream watch handling link in a single place

2017-12-19 Thread Uri Lublin
Hi Frediano, Note that there still is another call to red_stream_remove_watch, (in reds_handle_ssl_accept), so consider changing the subject. One comment below. On 12/19/2017 03:38 PM, Frediano Ziglio wrote: Signed-off-by: Frediano Ziglio --- server/reds.c | 3 +-- 1 file changed, 1 inser

Re: [Spice-devel] [PATCH spice-server 08/11] red-stream: Simplify mechname matching

2017-12-19 Thread Christophe Fergeau
On Mon, Dec 11, 2017 at 10:28:05AM +, Frediano Ziglio wrote: > Avoid over complicated matching using quoting and a simple > strstr operation. I would explain the trick with sasl_mechlist prefix/suffix in the commit log. Looks good otherwise > > Signed-off-by: Frediano Ziglio > --- > serve

Re: [Spice-devel] [PATCH spice-server 1/3] dcc: Remove obsolete comment

2017-12-19 Thread Christophe Fergeau
For the series, Acked-by: Christophe Fergeau On Wed, Dec 13, 2017 at 02:01:57PM +, Frediano Ziglio wrote: > RedPipeItem does not contain a link anymore. > > Signed-off-by: Frediano Ziglio > --- > server/dcc.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/server

Re: [Spice-devel] [PATCH spice-server 01/11] stat-file: Protect flags field with atomic operation

2017-12-19 Thread Christophe Fergeau
On Mon, Dec 11, 2017 at 10:27:58AM +, Frediano Ziglio wrote: > Coverity complaint that this field should be protected by > a mutex as other accesses are with the mutex locked. > Use atomic operation. Not in an hot path in any case. > > Signed-off-by: Frediano Ziglio > --- > server/stat-file.

[Spice-devel] [nsis v3 2/2] build: Don't add .pdb debug files to the installer

2017-12-19 Thread Christophe Fergeau
The .pdb files contain the debug information for the drivers. They increase significantly the size of the installer, so it's better not to ship them. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index df8f7bc..841f01a 100644 --- a/Makefile ++

[Spice-devel] [nsis v3 1/2] Properly quote path to service binaries

2017-12-19 Thread Christophe Fergeau
If these paths are unquoted, and the path contains spaces (C:\Program Files (x86)\...), this could be exploited by putting a binary with a crafted name (C:\Program.exe), leading to privilege escalation as this is a service that is being started. https://www.commonexploits.com/unquoted-service-path

Re: [Spice-devel] [nsis 1/2] Properly quote path to service binaries

2017-12-19 Thread Christophe Fergeau
On Sat, Dec 16, 2017 at 04:14:49AM -0500, Frediano Ziglio wrote: > > > > If these paths are unquoted, and the path contains spaces (C:\Program > > Files (x86)\...), this could be exploited by putting a binary with a > > crafted name (C:\Program.exe), leading to privilege escalation as this > > is

[Spice-devel] [PATCH spice-server] reds: Remove stream watch handling link in a single place

2017-12-19 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- server/reds.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/reds.c b/server/reds.c index 9102c5122..66f24c72e 100644 --- a/server/reds.c +++ b/server/reds.c @@ -1791,7 +1791,6 @@ static void reds_handle_main_link(RedsState *reds,

Re: [Spice-devel] [PATCH spice-server 01/11] stat-file: Protect flags field with atomic operation

2017-12-19 Thread Uri Lublin
On 12/11/2017 12:27 PM, Frediano Ziglio wrote: Coverity complaint that this field should be protected by a mutex as other accesses are with the mutex locked. Use atomic operation. Not in an hot path in any case. > Signed-off-by: Frediano Ziglio Acked-by: Uri Lublin --- server/stat-file.c

[Spice-devel] [PATCH spice-server] main-channel-client: Do not call red_channel_client_begin_send_message if we are not sending a message

2017-12-19 Thread Frediano Ziglio
In case mcc->priv->initial_channels_list_sent is false we didn't marshall any message so we should not call red_channel_client_begin_send_message. Signed-off-by: Frediano Ziglio --- server/main-channel-client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/main-cha