summaryrefslogtreecommitdiffstats
path: root/libcacard
Commit message (Collapse)AuthorAgeFilesLines
* libcacard: Fix unchecked strdup() by converting to g_strdup()Markus Armbruster2013-01-303-5/+5
| | | | | | | | Note that we already free with g_free(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* build: fold trace-obj-y into libqemuutil.aPaolo Bonzini2013-01-121-1/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: move libqemuutil.a components to util/Paolo Bonzini2013-01-121-3/+3
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: list oslib-obj-y file explicitlyPaolo Bonzini2013-01-121-1/+5
| | | | | | | We will grow the list of files in the next patches, but libcacard should remain slim. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: link vscclient to dynamic libraryPaolo Bonzini2013-01-121-2/+1
| | | | | | | There is no reason for vscclient to duplicate the code. rules.mak takes care of invoking libtool to do the link. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: rewrite Makefile in non-recursive stylePaolo Bonzini2013-01-121-25/+10
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: add list of exported symbolsPaolo Bonzini2013-01-122-1/+79
| | | | | | Do not export internal QEMU symbols. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: use per-target variable definitionsPaolo Bonzini2013-01-121-2/+5
| | | | | | This lets the libcacard Makefile use more rules.mak magic. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: prepare to use -y trick in the MakefilePaolo Bonzini2013-01-121-6/+4
| | | | | | | Rename variables to follow the conventions of the rest of the build systems. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: require libtool to build itPaolo Bonzini2013-01-121-8/+0
| | | | | | | Do not fail at build time, instead just disable the library if libtool is not present. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: fix missing symbol in libcacard.soAlon Levy2013-01-121-1/+1
| | | | | | | | | | | Before patch: $ make libcacard.la $ nm ./libcacard/.libs/libcacard.so.0.0.0 | grep " U " | \ egrep -v "(g_)|(GLIBC)|(SECMOD)|(PK11)|(CERT)|(NSS)|(PORT)|(PR)" U error_set Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: support linking with libtool objects/librariesPaolo Bonzini2013-01-121-4/+7
| | | | | | | This patch moves the complication of using libtool to the generic rules.mak file. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: make libtool verbose when making with V=1Paolo Bonzini2013-01-121-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-193-4/+4
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: link in stubsPaolo Bonzini2012-11-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard: make unnesting rules available to Makefile.objsPaolo Bonzini2012-11-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* Merge branch 'trivial-patches' of git://github.com/stefanha/qemuAurelien Jarno2012-10-063-5/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'trivial-patches' of git://github.com/stefanha/qemu: versatilepb: Use symbolic indices for ARM PIC qdev: kill bogus comment qemu-barrier: Fix compiler version check for future gcc versions hw: Add missing 'static' attribute for QEMUMachine cleanup useless return sentence qemu-sockets: Fix compiler warning (regression for MinGW) vnc: Fix spelling (hellmen -> hellman) in comment slirp: Fix spelling in comment (enought -> enough, insure -> ensure) tcg/arm: Use tcg_out_mov_reg rather than inline equivalent code cpu: Add missing 'static' attribute to qemu_global_mutex configure: Support empty target list (--target-list=) hw: Fix return value check for bdrv_read, bdrv_write
| * cleanup useless return sentenceAmos Kong2012-10-053-5/+0
| | | | | | | | | | | | | | | | This patch cleans up return sentences in the end of void functions. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* | libcacard/vcard_emul_nss: use pstrcpy in place of strncpyJim Meyering2012-10-052-2/+4
|/ | | | | | | | | | Replace strncpy+NUL-terminate use with use of pstrcpy. This requires linking with cutils.o (or else vssclient doesn't link), so add that in the Makefile. Acked-by: Alon Levy <alevy@redhat.com> Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* libcacard: build fixesBlue Swirl2012-06-211-4/+5
| | | | | | | | | | | | | | | | | | | | | Link trace objects to fix these errors: LINK vscclient oslib-posix.o: In function `trace_qemu_vfree': /src/qemu/obj-amd64/./trace.h:39: undefined reference to `trace1' oslib-posix.o: In function `trace_qemu_memalign': /src/qemu/obj-amd64/./trace.h:31: undefined reference to `trace3' oslib-posix.o: In function `trace_qemu_vmalloc': /src/qemu/obj-amd64/./trace.h:35: undefined reference to `trace2' Add LDFLAGS to vscclient link command. Clean up also in subdirectories of libcacard. Use quiet-command for sed invocation. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Alon Levy <alevy@redhat.com>
* build: libcacard Makefile cleanupsPaolo Bonzini2012-06-071-11/+6
| | | | | | Build vscclient from toplevel Makefile, limit usage of vpath. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* libcacard/vcard_emul_nss: add warning for old coolkeyAlon Levy2012-03-261-0/+10
| | | | | | | | | Older coolkey versions (before the future fix of RHBZ 802435) have a fake card reader created if no reader is detected during module initialization. Warn libcacard users if the faulty coolkey is detected by checking for the fake reader name "E-Gate 0 0". Signed-off-by: Alon Levy <alevy@redhat.com>
* libcacard/vcard_emul_nss: handle no readers at startupAlon Levy2012-03-261-10/+5
| | | | | | | | | | | When starting with no readers, coolkey should show no slots (with RHBZ 806038 fixed). Fix initialization to launch the event handling thread for each module that isn't the internal module regardless of the number of slots detected for it at initialization time, since slot number may start as 0 and is dynamic. RHBZ: 802435 Signed-off-by: Alon Levy <alevy@redhat.com>
* libcacard/vcard_emul_nss: don't stop thread when there are no slotsAlon Levy2012-03-261-0/+11
| | | | Signed-off-by: Alon Levy <alevy@redhat.com>
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-03-091-11/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: configure: Quote the configure args printed in config.log osdep: Remove local definition of macro offsetof libcacard: Spelling and grammar fixes in documentation Spelling fixes in comments (it's -> its) vnc: Add break statement libcacard: Use format specifier %u instead of %d for unsigned values Fix sign of sscanf format specifiers block/vmdk: Fix warning from splint (comparision of unsigned value) qmp: Fix spelling fourty -> forty qom: Fix spelling in documentation sh7750: Remove redundant 'struct' from MemoryRegionOps
| * Spelling fixes in comments (it's -> its)Stefan Weil2012-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | * it's -> its (fixed for all files) * dont -> don't (only fixed in a line which was touched by the previous fix) * distrub -> disturb (fixed in the same line) Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * libcacard: Use format specifier %u instead of %d for unsigned valuesStefan Weil2012-03-081-10/+10
| | | | | | | | | | | | | | splint reported warnings for those code statements. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | libcacard: Fix compilation with gcc-4.7Hans de Goede2012-03-091-2/+2
|/ | | | | | | | | VCARD_ATR_PREFIX is used as part of an array initializer so it should not have () around it, so far this happened to work, but gcc-4.7 does not like it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* libcacard: fix reported ATR lengthAlon Levy2012-02-271-2/+2
| | | | | Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* make: Remove duplicate use of GLIB_CFLAGSStefan Weil2012-02-091-2/+0
| | | | | | | | | | | Makefile, Makefile.hw, Makefile.target and libcacard/Makefile added GLIB_CFLAGS to QEMU_CFLAGS. Makefile.objs does this, too, and is included by all other Makefiles, so GLIB_CFLAGS were added twice (reported by malc). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: malc <av1474@comtv.ru>
* fix spelling in libcacard sub directoryDong Xu Wang2011-12-024-5/+5
| | | | | Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* libcacard: Fix wrong assertion (reported by cppcheck)Stefan Weil2011-10-251-1/+1
| | | | | | | | assert("...") will never do anything. This assertion handles a case which should never occur, so it must be assert(!"..."). Cc: Alon Levy <alevy@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de>
* libcacard/vscclient: fix error paths for socket creationAlon Levy2011-10-251-2/+7
| | | | Signed-off-by: Alon Levy <alevy@redhat.com>
* libcacard/cac: fix typo in cac_delete_pki_applet_privateAlon Levy2011-10-251-1/+2
| | | | Signed-off-by: Alon Levy <alevy@redhat.com>
* Silence make if nothing is to do for libcacardJan Kiszka2011-09-211-0/+2
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* libcacard: use INSTALL_DATA for dataBrad Smith2011-09-021-1/+1
| | | | | Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Fix spelling in comments and debug messages (recieve -> receive)Stefan Weil2011-08-291-1/+1
| | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Reviewed-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Fix build on OpenBSD with BSD userland emu and smartcard NSS enabledBrad2011-08-271-2/+2
| | | | | | | | | | | | | | | | | The first issue is the hard coded POSIX Real Time extensions library in the libcacard/Makefile. From looking at the code it doesn't seem this is necessary anyway. Robert Relyea seems to think it most likely isn't necessary. The second issue was the missing exclusion of the BSD userland binary builds from the addition of this Makefile target for the smartcard NSS code which breaks the builds if smartcard NSS support is enabled. pastebin clip of the build failure.. http://pastebin.com/raw.php?i=BLCKd3s6 Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Improvements to libtool support.Brad2011-08-221-5/+5
| | | | | | | | | | | Improvements to the libtool support in QEMU. Replace hard coded libtool in the infrastructure with $(LIBTOOL) and allow overriding the libtool binary used via the configure script. Reviewed-by: Andreas F=E4rber <andreas.faerber@web.de> Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* build: list libraries after objects, for proper linkageDiego Elio Pettenò2011-08-221-2/+2
| | | | | | | | Without this change, when using -Wl,--as-needed with GNU linker, the libraries would be discarded. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove remenants of qemu_mallocAnthony Liguori2011-08-211-1/+1
| | | | | | This covers the various check commands Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-207-66/+66
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Make glib mandatory and fixup utils appropriatelyAnthony Liguori2011-08-201-1/+3
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* libcacard: use INSTALL_DATA for dataAlon Levy2011-08-021-3/+2
| | | | Signed-off-by: Alon Levy <alevy@redhat.com>
* libcacard: add pc file, install it + includesAlon Levy2011-07-262-3/+37
| | | | | | Additionally: + add --includedir configure parameters + make install-libcacard install vscclient as well
* libcacard: replace copy_string with strndupChristophe Fergeau2011-07-221-17/+6
| | | | | | | | copy_string reimplements strndup, this commit removes it and replaces all copy_string uses with strndup. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
* libcacard: introduce NEXT_TOKEN macroChristophe Fergeau2011-07-221-47/+24
| | | | | | | | | | vcard_emul_options now has repetitive code to read the current token and advance to the next. After the previous changes, this repetitive code can be moved in a NEXT_TOKEN macro to avoid having this code duplicated. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
* libcacard: fix soft=... parsing in vcard_emul_optionsChristophe Fergeau2011-07-221-17/+28
| | | | | | | | | | | | The previous parser had copy and paste errors when computing vname_length and type_params_length, "name" was used instead of respectively vname and type_params. This led to length that could be bigger than the input string, and to access out of the array bounds when trying to copy these strings. valgrind rightfully complained about this. It also didn't handle empty fields correctly, Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
* libcacard: s/strip(args++)/strip(args+1)Christophe Fergeau2011-07-221-2/+2
| | | | | | | | | | | vcard_emul_options used args = strip(args++) a few times, which was not returning the expected result since the rest of the code expected args to be increased by at least 1, which is not the case if *args is not a blank space when this function is called. Replace these calls by "strip(args+1)" which will do what we expect. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Reviewed-by: Alon Levy <alevy@redhat.com>
* libcacard: don't leak vcard_emul_alloc_arrays memChristophe Fergeau2011-07-221-1/+10
| | | | | | | | | | vcard_emul_mirror_card and vcard_emul_init use vcard_emul_alloc_arrays to allocate memory for temporary arrays which will contain elements that in the end will be used one by one in cac_card_init. The arrays themselves are never stored anywhere, they are only used as temporary containers. Hence the memory that was allocated for these arrays should be freed after use or they will be leaked.
OpenPOWER on IntegriCloud