Re: [PATCH spice-common] build: Remove FIXME_SERVER_SMARTCARD hack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 05, 2018 at 11:19:05AM -0300, Eduardo Lima (Etrunko) wrote:
> On 05/03/18 08:03, Christophe Fergeau wrote:
> > On Fri, Mar 02, 2018 at 12:14:29PM -0300, Eduardo Lima (Etrunko) wrote:
> >> When we remove the hacks in configure.ac and common/Makefile.am, two
> >> errors pop out:
> >>
> >> generated_server_demarshallers.c: In function ‘parse_msgc_smartcard_reader_add’:
> >> generated_server_demarshallers.c:1985:30: error: ‘mem_size’ undeclared (first use in this function); did you mean ‘nw_size’?
> >>      data = (uint8_t *)malloc(mem_size);
> >>                               ^~~~~~~~
> >>                               nw_size
> >>
> >> First one is caused by a missing declaration of mem_size, so we use the
> >> same condition that causes this code to be added to the check for the
> >> need of mem_size variable declaration in demarshal.py.
> >>
> >> generated_server_demarshallers.c:1985:30: note: each undeclared identifier is reported only once for each function it appears in
> >> generated_server_demarshallers.c:1994:15: error: ‘VSCMsgReaderAdd {aka struct VSCMsgReaderAdd}’ has no member named ‘reader_name’
> >>      memcpy(out->reader_name, in, reader_name__nelements);
> >>                ^~
> >>
> >> This second one is only a rename of 'reader_name' field to 'name', as
> >> specified in the VSCMsgReaderAdd structure in file vscard_common.h.
> >>
> >> Signed-off-by: Eduardo Lima (Etrunko) <etrunko@xxxxxxxxxx>
> >> ---
> >>  common/Makefile.am          | 2 --
> >>  configure.ac                | 7 -------
> >>  python_modules/demarshal.py | 2 +-
> >>  spice.proto                 | 2 +-
> >>  4 files changed, 2 insertions(+), 11 deletions(-)
> >>
> >> diff --git a/common/Makefile.am b/common/Makefile.am
> >> index 22aec80..ea15039 100644
> >> --- a/common/Makefile.am
> >> +++ b/common/Makefile.am
> >> @@ -78,8 +78,6 @@ libspice_common_server_la_SOURCES =		\
> >>  	$(SERVER_MARSHALLERS)			\
> >>  	$(NULL)
> >>  
> >> -libspice_common_server_la_CFLAGS = -DFIXME_SERVER_SMARTCARD
> >> -
> >>  AM_CPPFLAGS =				\
> >>  	-I$(top_srcdir)			\
> >>  	-I$(top_builddir)		\
> >> diff --git a/configure.ac b/configure.ac
> >> index 3542161..5230223 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -63,11 +63,4 @@ AC_CONFIG_FILES([
> >>    docs/Makefile
> >>  ])
> >>  
> >> -AH_BOTTOM([
> >> -/* argh.. this is evil */
> >> -#if defined(FIXME_SERVER_SMARTCARD) && defined(USE_SMARTCARD)
> >> -%:undef USE_SMARTCARD
> >> -#endif
> >> -])
> > 
> > This change means that when building spice-common with spice-server,
> > we'll now enable the parse_SmartcardChannel_msgc codepath in
> > spice_get_client_channel_parser(). It seems this is not going to be used
> > as smartcard.c does not call this method, but have you checked this is
> > indeed not introducing regressions?
> > 
> 
> I did not test the codepath itself, to be honest, I don't really know I
> could test it, but as far as I could see, it looks like there are no
> regressions, all my VMs still run just fine.

For what it's worth, https://www.spice-space.org/smartcard-usage.html
should have some notes regarding how to setup a 'software smartcard'
which can be used for testing this kind of things. Instructions might be
outdated, feel free to ping me for help setting this up.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]