Commit Graph

127 Commits

Author SHA1 Message Date
Armin Novak
4eb5b8e349 Replaced atoi 2017-11-15 15:52:16 +01:00
Armin Novak
0490aeb018 Fixed clang malloc integer overflow warnings. 2017-07-20 09:29:48 +02:00
dodo040
2f22e679e0 fix format code 2017-07-19 13:16:08 +02:00
dodo040
4e055453ab fix smartcard argument parsing 2017-07-19 13:16:08 +02:00
dodo040
722e927c64 redirect specific smartcard readers 2017-07-19 13:16:08 +02:00
Andreas Schultz
d2f98261f7 smartcard: implement ListReaderGroups
Conflicts:
	channels/smartcard/client/smartcard_operations.c
	channels/smartcard/client/smartcard_pack.c
	channels/smartcard/client/smartcard_pack.h

smartcard_operations: move handling of call argument into functions

The call argument was only use by static functions and was always equal
to operation->call. Remove the argument and use operation-call directly.

Also put the memory allocation and check into the same place.

Conflicts:
	channels/smartcard/client/smartcard_operations.c

Updated formatting and API
2017-02-16 16:59:03 +01:00
Norbert Federa
f71b6b46e8 fix string format specifiers
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
2016-12-16 13:48:43 +01:00
Armin Novak
eacf2b542e Fixed memory leaks. 2016-05-12 10:01:30 +02:00
Armin Novak
68c402ac58 Removed windows module.def files.
All symbols exported from libraries are declared
using *_API defines.
2016-02-29 15:18:47 +01:00
clangm
62a559ad03 fix typo
Pretty sure that's supposed to be __MACOSX__, not __MAXOSX__
2016-01-27 15:40:08 -07:00
Bernhard Miklautz
07417599ce wlog: rework, cleanup and stabilize API
* only expose necessary functions and types in header
* don't expose appender internals
* add generic function WLog_ConfigureAppender to have the possibility
  to configure appender specific settings
* detect appender availability if WLog_SetLogAppenderType or
  WLog_Appender_New return FALSE or NULL respectively the appender isn't
  available or the initialization failed. This is very useful for the
  use with optional appenders.
* add Free to the appender interface. At the time of the Free the
  appender is known and available so it can be called directly (instead
  of calling the right function according to the type)
* make all appender internal function static
* all appenders return the generic wLogAppender type now. Typecasts
  are internally done where necessary this abstracts the appenders more
  cleanly
2015-11-09 18:25:45 +01:00
bjcollins
ac67e25007 Give unique aliases for smartcards with the same name, so that two readers do not end up with the same alias. 2015-09-02 12:11:47 -05:00
Rostislav Kondratenko
3f81ff87a6 Removing private context on hCard so that transaction will properly unlock when context is released. 2015-07-17 18:13:41 +03:00
Rostislav Kondratenko
f2863fabf5 Re-enabled PCSC-Lite transactions and fixed smartcard deinitialization so it will release all contexts to unblock calls waiting for transactions 2015-07-17 16:37:44 +03:00
Bernhard Miklautz
bf73f4e4f1 Fix unchecked strdups
* add missing checks
* adapt function return values where necessary
* add initial test for settings
2015-06-22 19:09:59 +02:00
Armin Novak
7403cdc60c Added PathMakePath function. 2015-06-09 13:16:28 +02:00
David FORT
29d372480a Take in account nfedera's review 2015-05-20 19:19:50 +02:00
Hardening
f8120919af Add checks for some XXX_New and XXX_Add functions
Based on PR #2616
2015-05-18 11:28:00 +02:00
Norbert Federa
f9f59cd29b Fix unchecked CreateDirectory calls 2015-05-07 13:28:13 +02:00
Norbert Federa
ef1fd12b15 Fix unchecked CreateEvent calls and misc fixes
1)
Added missing checks for CreateEvent which also required the
following related changes:

- changed freerdp_context_new API to BOOL
- changed freerdp_peer_context_new API to BOOL
- changed pRdpClientNew callback to BOOL
- changed pContextNew callback to BOOL
- changed psPeerAccepted callback to BOOL
- changed psPeerContextNew callback to BOOL

2)
Fixed lots of missing alloc and error checks in the
changed code's neighbourhood.

3)
Check freerdp_client_codecs_prepare result to avoid segfaults
caused by using non-initialized codecs.

4)
Fixed deadlocks in x11 caused by missing xf_unlock_x11() calls
in some error handlers

5)
Some fixes in thread pool:
- DEFAULT_POOL assignment did not match TP_POOL definition
- don't free the pool pointer if it points to the static DEFAULT_POOL
- added error handling and cleanup in InitializeThreadpool
2015-04-29 18:18:39 +02:00
Armin Novak
60de56e1bb Fixed NULL dereference and double free 2015-04-16 21:56:57 +02:00
Bernhard Miklautz
a8c44f15c0 winpr: small fixes and cleanups
Update the pull request and integrate the latest comments and
suggestions.

* TestLibrary*: fix typo in error message
* TestPipeCreateNamedPipeOverlapped: free possibly allocated memory
* smartcard_pcsc.c: format fix
* process.c: add missing NULL check
* MessageQueue.c: delete possibly initialized critical section on error
2015-04-08 11:34:37 +02:00
Bernhard Miklautz
850de59b55 winpr: add checks for *alloc
Add missing checks if memory allocation was successful. Also adapt
caller(s) when possible.
2015-04-08 11:34:37 +02:00
Marc-André Moreau
cb002d91cd channels/smartcard: fix pioRecvPci with cbExtraBytes > 0 2015-03-13 14:20:57 -04:00
Marc-André Moreau
6b6c368e3a libwinpr-smartcard: stub new transaction system 2015-01-20 21:40:45 -05:00
Marc-André Moreau
344a1b52ca libwinpr-smartcard: remove unused (and useless) pcsc-lite static link option 2015-01-20 20:15:10 -05:00
Marc-André Moreau
f0fc27f7bd libwinpr-winscard: add WINPR_WINSCARD_LOCK_TRANSACTIONS environment variable, fix winpr_HexDump line feeds 2015-01-20 15:29:05 -05:00
Marc-André Moreau
73cfa920a9 libwinpr-smartcard: add SCARD_ATTR_CHANNEL_ID 2015-01-19 14:56:02 -05:00
Marc-André Moreau
51554ff16c channels: patch rdpdr/smartcard valgrind leaks, fix hang on disconnect 2014-12-28 14:56:13 -05:00
Marc-André Moreau
9ebc67ba02 channels/smartcard: cleanup SCardControl 2014-12-22 16:25:59 -05:00
Marc-André Moreau
0625be2720 channels/smartcard: fix SCardGetAttrib SCARD_AUTOALLOCATE support 2014-12-22 13:28:16 -05:00
Vincent Sourin
719e5c9cdb Determine OSX Version ... only on OSX 2014-12-14 15:15:33 +01:00
Vincent Sourin
8a028f78e2 * Determine OS X Version at runtime 2014-12-13 05:30:44 -08:00
Vincent Sourin
956cece54b * Correct detection of Mac OS X Yosemite Version 2014-12-09 22:14:06 +01:00
Vincent Sourin
64ff9ee1b6 SmartCard
* Check for NULL parameters in PCSC_ConvertReaderNameToWinSCard (Issue #2184)
* Remove masking of dwEventState as it is not needed under Linux and MacOSX and it helps in ThinLinc environment
* Workaround for Mac OS X Yosemite (10.10) SCardStatus Bug (Issue #2184)
* Since Mac OS Tiger (10.5.6), Apple introduced new function for SCardControl calls named SCardControl132(), the old SCardControl doesn't work (cf. https://opensource.apple.com/source/SmartCardServices/SmartCardServices-55111/src/PCSC/winscard_clnt.c)
2014-12-09 20:14:57 +01:00
Armin Novak
55e455f1ab Fixed memory leaks. 2014-11-16 22:50:50 +01:00
Armin Novak
b7d5bf49f8 Fixed NULL pointer dereference. 2014-11-16 16:53:55 +01:00
Marc-André Moreau
367ceff02c libwinpr-smartcard: revert minor change from pull request #2195 2014-11-11 12:00:37 -05:00
Marc-André Moreau
d4bdf52b07 libwinpr-smartcard: re-enable SCardGetStatusChange status filtering 2014-11-11 11:46:59 -05:00
Vinche
d427faf5c6 Cleaning Code 2014-11-10 23:51:34 +01:00
Vinche
fdb95c712b Implementation for Smartcard Reader with Pin Pad 2014-11-10 23:40:22 +01:00
Vinche
69766de29f Add comments to modifications 2014-11-09 23:02:12 +01:00
Vinche
bbff8db75f Add comments to modifications 2014-11-09 23:00:41 +01:00
Vinche
2708a8de5c first commit 2014-11-09 22:42:35 +01:00
Marc-André Moreau
83ecddd6c1 xfreerdp: replace cliprdr to wire format conversion 2014-10-17 20:40:11 -04:00
Marc-André Moreau
334dec3c1f winpr: add pragma pack, bitmap + clipboard definitions 2014-10-16 21:45:47 -04:00
Armin Novak
a15df299e9 Removed last remainig printf. 2014-09-09 16:32:23 +02:00
Armin Novak
b22b897389 Reformatted changed files. 2014-09-09 16:32:22 +02:00
Armin Novak
7e3a1b3073 Now using macro to generate module specific log tag. 2014-09-09 16:32:04 +02:00
Armin Novak
28ece6bb46 Replaced stdio logging with WLog 2014-09-09 16:31:46 +02:00