Commit Graph

3908 Commits

Author SHA1 Message Date
akallabeth
8b6091a007
[winpr,wtsapi] improve API usage
* Mark WTSVirtualChannelOpen and WTSVirtualChannelOpenEx with
  WINPR_ATTR_MALLOC to enforce compiler checks for resource cleanup
* Fix unused result warnings, use the result or cast to (void) where not
  requierd
2024-09-14 21:29:31 +02:00
akallabeth
a1cef8dd85
[warnings] silence and fix unused results 2024-09-14 21:29:28 +02:00
akallabeth
65de25205b
[winpr,env] add missing WINPR_ATTR_MALLOC 2024-09-14 21:29:26 +02:00
akallabeth
6327b77461
[winpr,crypto] fix type warnings in test case 2024-09-14 17:39:38 +02:00
akallabeth
dbe92795e3
[winpr,kerberos] fix possible NULL argument to strdup 2024-09-14 08:31:01 +02:00
akallabeth
d5b41bb8a0
[warnings] fix casts
* Add macro WINPR_REINTERPRET_CAST to cast (checked) from type A to B
* Fix cast warnings
2024-09-14 08:24:51 +02:00
akallabeth
5a711f5ae4
[winpr,collections] fix cast to float 2024-09-14 08:24:45 +02:00
akallabeth
71080e61b0
[warnings] fix a bunch of them
* fix uninitialized variable warnings
 * modivy ndr_context_* functions to utilize WINPR_ATTR_MALLOC
 * build_krbtgt use winpr_asprintf
 * add proper Stream_Write_UINT64_BE
2024-09-14 08:24:28 +02:00
akallabeth
16cec716e0
[strtok] replace function with strtok_s
Since strtok is not thread safe replace it with strtok_s (WinPR wrapper
around strtok_r for systems not supporting the ISO function names)
2024-09-13 21:19:17 +02:00
akallabeth
d2641ea55f
[winpr,include] fix reserved-identifier warnings
* Remove symbols where possible
* Use #pragma where the symbols are implementing ISO or windows
  functions
2024-09-13 14:30:33 +02:00
akallabeth
7ef9345743
Merge pull request #10549 from hardening/rcg2
core, channels: client-side remote credential guard
2024-09-13 08:24:14 +02:00
akallabeth
163aec7e2b
[warnings] fix documentation command unknown 2024-09-12 21:21:41 +02:00
akallabeth
fb5934007a
[doxygen] add basic documentation for new API
* Add basic documentation for new functions/structs/data types since
  3.0.0
2024-09-12 20:09:19 +02:00
akallabeth
98f22d49b9 [CMake] add public headers as INTERFACE target 2024-09-12 18:54:40 +02:00
akallabeth
c84655cd62
[warnings] remove const params
Avoid const TYPE* const type declarations
2024-09-12 14:29:25 +02:00
akallabeth
a1a1fc8658
[warnings] fix mismatches between declaration and implementation 2024-09-12 13:32:44 +02:00
akallabeth
f74fd1ab0f
[warnings] silence unused macro warnings
* Add WINPR_PRAGMA_DIAG_IGNORED_UNUSED_MACRO
* Silence usages that
2024-09-12 13:30:08 +02:00
akallabeth
f62325d443
[winpr] silence -Wreserved-identifier
* Add macro WINPR_PRAGMA_DIAG_IGNORED_RESERVED_IDENTIFIER
* Silence use in wtypes.h.in to avoid false positives
2024-09-12 13:30:05 +02:00
akallabeth
adc4f2abf8
[warnings] fix unused variables 2024-09-12 13:29:58 +02:00
akallabeth
29697ca68d
[winpr,ncryt] fix a memory leak
NCryptP11EnumKeys did leak memory under certain conditions
2024-09-12 13:29:55 +02:00
akallabeth
6481993305
[winpr,ncrypt] do not abort test if NCryptEnumKeys fails 2024-09-12 13:29:50 +02:00
akallabeth
f9141fb94b
[winpr,ncrypt] improve logging 2024-09-12 13:29:48 +02:00
akallabeth
e00661d338
[warnings] fix dead store warnings 2024-09-12 13:29:46 +02:00
akallabeth
fa9fff6ed0
[winpr,clipboard] properly define guard function 2024-09-12 09:09:00 +02:00
akallabeth
cc6850bf21
[warnings] fix format nonliteral
add pragma to suppress format nonliteral warnings where appropriate
2024-09-12 09:08:53 +02:00
akallabeth
8a990644c0
[warnings] fix missing NULL assert/check 2024-09-12 09:08:51 +02:00
akallabeth
66153045be
[winpr,timezone] Include TimeZoneNameMap as header
* Update tzextract to generate header
* Update TimeZoneNameMapUtils to include header
2024-09-11 23:41:58 +02:00
akallabeth
384cd284d8
[warnings] use WINPR_CAST_CONST_AWAY
on locations that require (ugly) const to non const casts usw
WINPR_CAST_CONST_AWAY to do proper compiler specific casts to avoid
warnings
2024-09-11 23:41:50 +02:00
akallabeth
8ba7b65725
[winpr,secapi] add invalid value to KERB_LOGON_SUBMIT_TYPE 2024-09-11 20:50:27 +02:00
akallabeth
11671bcd5b
[warnings] fix unreachable code return 2024-09-11 20:50:24 +02:00
akallabeth
eb70b1756b
[winpr,wlog] fix GNU variadic macro 2024-09-11 20:50:17 +02:00
David Fort
a4bd5ba886 core, channels: client-side remote credential guard
This patch implements the client-side part of the remote credential guard feature
as described in MS-RDPEAR. The 2 main changes are: shipping the TSRemoteGuardaCreds in
NLA, and implement the rdpear channel that allows LSASS to remote all the calls to
our client. For now it's UNIX only as the windows implementation would be implemented
in a completely different way.
To test, you may establish you ccache and then connect with (RCG enabled on the server):
	xfreerdp /remoteGuard /u:<user> /d:<domain> /v<server>

That should log you in, and in the session you should not be asked for credentials when
doing mstsc /remoteGuard /v:<other server>.
2024-09-11 17:15:11 +02:00
akallabeth
398efacb10 Update timezone definitions 2024-09-11 05:06:45 +00:00
akallabeth
edf6ab89f7
[warnings] fix dead store 2024-09-10 14:43:11 +02:00
akallabeth
c1918ac189
[winpr,wlog] fix cast warning 2024-09-10 14:42:52 +02:00
akallabeth
a085b0d228
[winpr,comm] fix compiler warnings 2024-09-10 14:42:28 +02:00
akallabeth
9738fc40f3
Merge pull request #10548 from akallabeth/serial-port
[BSD] build-serial-port
2024-09-09 09:41:12 +02:00
akallabeth
2170cc65e3
[warnings] cast return of fprintf (void)
fprintf returns a value. Not using it is mostly fine, but it generates
noise when compiling with all warnings on, so cast to (void)
2024-09-06 09:16:21 +02:00
akallabeth
749023bacb
Merge pull request #10555 from akallabeth/cast-fix-tls
[crypto,tls] simplify function pointer cast
2024-09-05 17:18:27 +02:00
akallabeth
7d48aee829
Merge pull request #10556 from akallabeth/stream-api-improve
[winpr,stream] add returning stream read/peek
2024-09-05 08:40:15 +02:00
akallabeth
b980bf2e14
[winpr,clipboard] use endian safe bitmap read/write 2024-09-04 21:56:44 +02:00
akallabeth
6a1c3b4545
[function pointer] use macro for GetProcAddress
Cast all results of GetProcAddress with WINPR_FUNC_PTR_CAST
2024-09-04 21:31:48 +02:00
akallabeth
889ae65a1f
[warnings] add WINPR_CAST_CONST_PTR_AWAY
simple macro casting a const pointer to a non const one.
2024-09-04 20:55:17 +02:00
akallabeth
245afb706c
[function pointers] unify casts with macro 2024-09-04 20:06:45 +02:00
akallabeth
1a9766e190
[warnings] fix function pointer casts 2024-09-04 20:06:43 +02:00
akallabeth
a82821b756
[winpr,stream] fix return value
signed int functions should not return unsigned values
2024-09-04 13:17:50 +02:00
akallabeth
d959121b2f
[winpr,stream] add returning stream read/peek
To make use easier add Stream functions that return the value read
instead of taking it as argument.
2024-09-04 13:17:43 +02:00
akallabeth
9c6126c470
[winpr,comm] build generic serial-port support
* Disable linux specific code if build on *BSD
* Build stub to just return NULL for unsupported platforms
2024-09-04 12:50:49 +02:00
akallabeth
0eb0cff367
[winpr,utils] fix integer size warnings 2024-09-04 12:50:43 +02:00
akallabeth
5aff241096
Merge pull request #10554 from akallabeth/tidy-silence
Tidy silence
2024-09-04 10:35:22 +02:00
akallabeth
9df86daf28
[winpr,comm] add missing includes 2024-09-04 10:14:07 +02:00
akallabeth
5e123735fa
[warnings] fixed sign-compare 2024-09-04 10:14:05 +02:00
akallabeth
b6e72c7674
Merge pull request #10551 from akallabeth/arch-fixes
Arch fixes
2024-09-04 09:56:35 +02:00
akallabeth
ebbfe598dc
[winpr,utils] unify bitmap reading
* clipboard synthesizer needs to read the bitmap header, use the function
  from utils/image
* check bitmap header in utils/image and abort if wrong
2024-09-04 09:07:18 +02:00
akallabeth
f3d84d4557
[warnings] use ARRAYSIZE macro 2024-09-03 15:10:58 +02:00
akallabeth
a89aefa8d4
[winpr,smartcard] disable linter warnings
* silenced readability-non-const-parameter warnings that can not be
  changeddue to API requirements
2024-09-03 13:07:16 +02:00
akallabeth
5a4a1a40ad
fix declaration and implementation parameter names 2024-09-03 12:24:53 +02:00
akallabeth
72ae7fb54f
[nolint] add cert-dcl37-c,cert-dcl51-cpp 2024-09-03 12:24:48 +02:00
Armin Novak
fe4cb6de65
[warnings] fix float/double warnings 2024-09-02 16:20:20 +02:00
Armin Novak
7c537d681f [winpr,file] mark winpr_fopen with WINPR_ATTR_MALLOC
enable allocator/deallocator checks for FILE* created by this function
2024-09-02 14:39:53 +02:00
Armin Novak
4b62174c4f
[winpr,platform] fix unknown-warning-option 2024-09-02 14:13:10 +02:00
Armin Novak
11a9c010f9
[winpr] wtypes NOLINT
Silence linter for basic type definitions that use reserved identifiers
2024-09-02 13:56:07 +02:00
akallabeth
6fb7bfd043
[winpr,unwind] fix _Unwind_GetLanguageSpecificData
The function has various return value definitions (void* or uintptr_t)
and no proper API versioning. So cast to the expected type regardless of
actual definition and silence linter for this specific line.
2024-08-31 11:17:54 +02:00
akallabeth
e756c90569
[warnings] clang-tidy suppress warnings
* Suppress NOLINT(bugprone-suspicious-include)
* Suppress __STDC_WANT_LIB_EXT1__ 1 // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
2024-08-30 22:03:47 +02:00
akallabeth
1dea19ac5f
[warnings] clang-tidy suppress warnings
* Suppress NOLINT(bugprone-suspicious-include)
* Suppress __STDC_WANT_LIB_EXT1__ 1 // NOLINT(bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp)
2024-08-30 16:01:11 +02:00
akallabeth
5887f8a558
[warnings] suppress warnings
Some warnings can not be solved as they depend on external libraries or
limitations of the C standard.
Suppress these warnings selectively
2024-08-30 15:40:16 +02:00
akallabeth
36fbed25c9
[winpr,include] define warning ignore macros
Define new macros to ignore specific compiler warnings:
* WINPR_PRAGMA_DIAG_IGNORED_OVERLENGTH_STRINGS
* WINPR_PRAGMA_DIAG_IGNORED_QUALIFIERS
2024-08-30 15:40:13 +02:00
akallabeth
7d3b2aebfd
[warnings] silence WINPR_FALLTHROGH 2024-08-30 15:40:03 +02:00
akallabeth
190929c018
[warnings] fix function pointer casts 2024-08-30 15:40:01 +02:00
akallabeth
f60e386f3e
[winpr,comm] do not compile with EMSCRIPTEN 2024-08-30 09:12:51 +02:00
akallabeth
e1d0efa817
Merge pull request #10532 from akallabeth/release-3.8.0
Release 3.8.0
2024-08-30 08:53:55 +02:00
akallabeth
ba9897f8b7
[warnings] replace rand() function use 2024-08-29 17:13:53 +02:00
akallabeth
bd637c6cd1
[warnings] fix various clang-tidy warnings 2024-08-29 17:13:50 +02:00
akallabeth
f3596b950a
3.8.1-dev0 cycle 2024-08-29 16:52:44 +02:00
akallabeth
d277e494c6
release-3.8.0 2024-08-29 16:52:41 +02:00
akallabeth
500495dc00
[warnings] fix SDL3 related issues 2024-08-29 16:03:51 +02:00
akallabeth
6a3564407e
[warnings] fix clang-tidy issues in winpr 2024-08-29 15:20:39 +02:00
akallabeth
9c9d74e920
[warnings] fix redundant casts 2024-08-29 12:03:09 +02:00
akallabeth
15456e1ee1
[warnings] fix implicit widening conversion 2024-08-29 10:47:20 +02:00
akallabeth
4439240fd3
Merge pull request #10525 from akallabeth/warn-fixes-err33-c
[warnings] fix cert-err33-c
2024-08-29 10:35:57 +02:00
akallabeth
1d33095500
[warnings] fix cert-err33-c
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
akallabeth
622fcc7025
[warnings] fix types and guards
Fix some broken define guards and a wrong return type
2024-08-29 09:53:48 +02:00
akallabeth
3b8dc5c183
[cmake] move WITH_VERBOSE_WINPR_ASSERT
Since the definition is common to FreeRDP and WinPR move it to
CommonConfigOptions
2024-08-29 08:44:39 +02:00
akallabeth
efde29f362
[winpr,utils] Set Queue_Enqueue only once
In #10527 performance was measured and SetEvent did take a lot of time
in these measurements. The reset is only required once though, so use a
more fine grained trigger condition.
2024-08-29 08:30:32 +02:00
akallabeth
d0addb52bd
[winpr,utils] Reset CountdownEvent_AddCount only once
In #10527 performance was measured and ResetEvent did take a lot of time
in these measurements. The reset is only required once though, so use a
more fine grained trigger condition.
2024-08-29 08:30:21 +02:00
akallabeth
380c5808a0
Merge pull request #10518 from akallabeth/clang-tidy-cleanup
Clang tidy cleanup
2024-08-28 16:36:16 +02:00
Armin Novak
3b1c1e0af1 [warnings] fix cppcoreguidelines-init-variables 2024-08-28 10:15:36 +02:00
Armin Novak
d71af44bb1
[warnings] disable warnings for generated code
* Disable clang-tidy in test build directories
* Disable compiler warnings for test binary directories.

These contain generated code we can not change, so the warnings are just noise
2024-08-28 09:18:30 +02:00
akallabeth
00eb86970d
Merge pull request #10510 from akallabeth/serial-cleanup
Serial cleanup
2024-08-26 13:47:10 +02:00
akallabeth
d08e44d883
[channels,serial] only build on linux
* Guard by CMake
* Remove code #ifdef to ease porting
2024-08-26 13:18:52 +02:00
akallabeth
d81dd9d9ff
[winpr,comm] fix stopping of serial threads
Since most unhandled threads get cancelled do not rely on
SERIAL_EV_WINPR_WAITING flag.
2024-08-26 12:36:56 +02:00
akallabeth
221dd7ce1d
[winpr,comm] improve error handling 2024-08-26 12:36:51 +02:00
akallabeth
9f911bea62
[winpr,comm] cleanup comm_sercx2_sys
* WINPR_ASSERT arugments
* remove use of restricted keywords (variables/functions starting with _)
2024-08-26 12:23:14 +02:00
akallabeth
2a7572e6b3
[winpr,comm] cleanup comm_serial_sys
* WINPR_ASSERT arguments
* remove use of restricted keywords (variables/functions starting with _)
2024-08-26 12:23:11 +02:00
akallabeth
56d660f258
[cmake] mark dependency includes SYSTEM
Mark all dependency include paths SYSTEM so warnings from system headers
are excluded from ci warning statistics
2024-08-26 11:10:49 +02:00
David Fort
c7b519472b
Merge pull request #10494 from fifthdegree/asn1_int_fix
Fix ASN.1 integer decoding
2024-08-21 22:46:37 +02:00
Isaac Klein
3fb7bd92cc Don't accept 0-length ASN.1 integers for decoding 2024-08-21 14:02:26 -04:00
Armin Novak
17d44e847f
[coverity] fix various warnings 2024-08-21 09:47:34 +02:00
Isaac Klein
9c413abee1 Fix ASN.1 integer decoding
Treat ASN.1 encoded integers with a leading zero byte and the MSB of the
second byte set as non-negative
2024-08-20 19:14:02 -04:00
akallabeth
4b7727bd4e
[winpr,utils] fix PNG bpp extraction 2024-08-19 11:50:15 +02:00
akallabeth
7f84bd5c81
[winpr,utils] fix image stride calculation 2024-08-19 11:50:11 +02:00
akallabeth
7dfdadbe53
[winpr,clipboard] add image clipboard tests 2024-08-19 11:50:07 +02:00
Armin Novak
b2e15b5f75
[winpr,timezone] disable clang-format for WindowsZones 2024-08-12 10:49:10 +02:00
akallabeth
f938c32afa
[winpr,ncrypt] check p11 for NULL 2024-08-09 10:41:43 +02:00
akallabeth
5e662cfb2d
[winpr,ncrypt] add checks to NCryptOpenP11StorageProviderEx 2024-08-09 09:40:27 +02:00
Armin Novak
12da65b033
[release] start 3.7.1-dev0 cycle 2024-08-08 11:38:21 +02:00
Armin Novak
4763f8675a
[release] 3.7.0 2024-08-08 11:38:21 +02:00
Armin Novak
5bee88c4d0
[winpr,string] fix variable names in doxygen 2024-08-08 08:45:45 +02:00
akallabeth
9fe1ff0165
fix #10446 2024-08-08 08:16:52 +02:00
akallabeth
15def36dd6
fix #10448 2024-08-08 08:16:52 +02:00
Ivelin
d7cbe4ed69 fix(winpr-json): typos causing make errors 2024-07-30 08:21:45 +03:00
akallabeth
70e9f4c5ea
Create timezone-update.yml 2024-07-23 14:26:23 +02:00
akallabeth
f22974a95a
[winpr,utils] include current source dir 2024-07-23 09:15:00 +02:00
akallabeth
776083234b
[warnings] fix unused-but-set-variable 2024-07-23 09:14:19 +02:00
akallabeth
0b0eae2adc
[winpr,sspi] fix wchar to byte endianess 2024-07-22 13:42:27 +02:00
akallabeth
4b6d614f19
Merge pull request #10394 from akallabeth/kbd_layout_from_file
Kbd layout from file
2024-07-22 11:07:57 +02:00
akallabeth
8998f6897a
[winpr,sspi] fix PTH string checks 2024-07-22 09:08:33 +02:00
akallabeth
e34b8b5205
[winpr,utils] add WINPR_JSON_AddItemToArray 2024-07-19 15:52:20 +02:00
Armin Novak
6133ee6da0
[winpr,timezone] update from tzextract
* Update existing data
* Add new file TimeZoneNameMap.json
* Add CMake install target for TimeZoneNameMap.json
2024-07-19 14:02:12 +02:00
akallabeth
f8405d5a4a
[winpr,timezone] add JSON generation to tzextract 2024-07-19 14:02:06 +02:00
akallabeth
bb360fbbdc
[winpr,timezone] Add new options to load from file
* WITH_TIMEZONE_FROM_FILE allows loading timezone definitions from a JSON
  file. (Requires WITH_WINPR_JSON, default OFF)
* WITH_TIMEZONE_COMPILED allows loading timezone definitions from an
  compiled in array. (Default ON)

Both of these options can be combined in any order. The data loaded from
file takes preference over compiled in values.
2024-07-19 13:23:03 +02:00
akallabeth
962a996dd9
[winpr,timezone] encapsulate timezonemap 2024-07-19 11:39:49 +02:00
akallabeth
6c682c8418
[client,common] add option to set timezone
* /timezone now allows setting the timezone used from a windows timezone
  key name
* /list:timezones now lists all available windows timezone key names
2024-07-19 11:39:46 +02:00
akallabeth
9eb484b21b
[winpr,timezone] implement EnumDynamicTimeZoneInformation 2024-07-19 11:39:41 +02:00
akallabeth
86030ee48a
dev-cycle 3.6.4-dev0 2024-07-08 09:43:03 +02:00
akallabeth
ffe75ce7b1
release-3.6.3 2024-07-08 09:43:00 +02:00
Armin Novak
e45a18dd34 [release] start 3.6.3-dev0 cycle 2024-07-04 12:11:26 +02:00
Armin Novak
2631f8d080 [release] 3.6.2 2024-07-04 12:11:26 +02:00
Armin Novak
3b8a2d3568
[release] start 3.6.2-dev0 cycle 2024-07-04 10:00:24 +02:00
Armin Novak
e767cf3b6c
[release] 3.6.1 2024-07-04 10:00:24 +02:00
akallabeth
2669edf623
start 3.6.1-dev0 cycle 2024-07-03 14:03:28 +02:00
akallabeth
41df7bcded
release 3.6.0 2024-07-03 14:03:28 +02:00
akallabeth
4099bd4e45
[warnings] integer casts/checks 2024-07-02 12:38:00 +02:00
akallabeth
b3f268ef86
[winpr,ncrypt] improve pkcs11 logging 2024-07-01 10:25:28 +02:00
akallabeth
6e1e35590e
[winpr,timezone] reduce log verbosity 2024-06-27 09:48:34 +02:00
akallabeth
3c4c827358
[winpr,timezone] Fix GetDynamicTimeZoneInformation
* Improve logging, use single function to dump data.
* Use GetDynamicTimeZoneInformation as man getter,
  GetTimeZoneInformation only retrieves a subset.
2024-06-26 20:59:43 +02:00
akallabeth
896ea3c445
[primitives,codec] guard SSE code with platform
SSE optimized code might be used in multiarch/universal builds.
So not only guard with WITH_SSE2 but also with architecture defines from
winpr/platform.h
2024-06-25 09:56:52 +02:00
Armin Novak
85078bf8c8
[winpr,timezone] fix transition date detection 2024-06-24 14:45:09 +02:00
akallabeth
0431b6c116
[winpr,timezone] fix windows timezone mappings
* WINDOWS_TZID_ENTRY struct members were inverted
* Entries with multiple IANA entries (separated by space) are now each
  checked for a match
2024-06-24 11:30:25 +02:00
akallabeth
fe2053c26d
[winpr,sysinfo] fix linux arm cpu feature detect 2024-06-18 08:48:14 +02:00
akallabeth
bcd663b7d9
Merge pull request #10269 from akallabeth/image_copy_sse
Image copy sse
2024-06-12 16:45:57 +02:00
oleg0421
34aed4e571 Fix errno undeclared error in json.c 2024-06-11 11:46:02 -07:00
akallabeth
4f6422ba86 [winpr,platform] add WINPR_PRAGMA_UNROLL_LOOP
add a define for compiler specific pragmas to enforce loop unrolling
2024-06-11 09:28:13 +02:00
akallabeth
14ba7fb601 [winpr,sysinfo] update IsProcessorFeaturePresent
Update instruction set detection for newer stuff (SSE4, AVC2, ...)
2024-06-11 09:26:52 +02:00
akallabeth
736774dd22
[winpr,pool] fix winpr_SetThreadpoolThreadMaximum
unlock the arraylist, don´t lock it twice.
2024-06-07 09:20:58 +02:00
Armin Novak
8d783d5189
[covertity] fix various warnings 2024-06-05 09:19:59 +02:00
akallabeth
c07ba558cb
[warnings] fix various compiler warnings 2024-06-04 13:23:24 +02:00
akallabeth
cf586b4d2e
Merge pull request #10242 from akallabeth/openssl3-md5
[winpr,crypto] OpenSSL3 md5 support
2024-06-04 10:50:34 +02:00
akallabeth
97d7a3fc6d
[winpr,crypto] OpenSSL3 md5 support
Just like https://github.com/MariaDB/server/pull/2010 add support for
OpenSSL3 MD5 in FIPS mode.
2024-06-04 10:27:27 +02:00
akallabeth
cefe7866a1
[winpr,pool] fix threadpool initialization 2024-06-03 14:51:04 +02:00
akallabeth
cbd2f5e65f
Merge pull request #10238 from akallabeth/krb-kdc-url
[sspi,krb] check for empty kdcUrl
2024-06-03 13:01:24 +02:00
akallabeth
a69dd9ad36
[sspi,krb] check for empty kdcUrl 2024-06-03 12:28:49 +02:00
akallabeth
8b23d785fa
[winpr,makecert] fix winpr-makecert month calculations
* Fix too tight range check
* Accumulated years and months in calculation
2024-06-03 10:05:18 +02:00
Armin Novak
b19d9619f8
[utils,unwind] log _Unwind_Backtrace failure 2024-05-29 14:35:51 +02:00
Armin Novak
1dcac1618c
[utils,unwind] add return to string functions 2024-05-29 09:25:25 +02:00
akallabeth
ef4c1766d2
[winpr,thread] implement SetThreadPriority 2024-05-24 15:44:17 +02:00
akallabeth
0b035d69e1
[winpr,wlog] fix format string
the millisecond format string should be "%03u" instead of "%02u"
2024-05-21 14:57:26 +02:00
akallabeth
48381d0d60
[winpr,utils] add json-c compat
for old json-c releases < 0.14.0 add a json_object_new_null replacement
2024-05-17 12:43:02 +02:00
akallabeth
4b3ecfac47
[winpr,utils] fix cJSON detection
* pkg-config sets CJSON_FOUND, check for that instead of the paths, which
  might be unset or set to <var>-NOTFOUND
* move detection to own file. find_package targets are meant to be used
  in same directory or below, but we define the WinPR target one above,
  so include it in parent
2024-05-16 13:27:22 +02:00
Armin Novak
4bdc9ad950
[winpr,utils] fix cJSON fallback detection 2024-05-15 13:46:38 +02:00
akallabeth
de49d32004
[cmake] fallback detection for cJSON 2024-05-14 21:16:43 +02:00
akallabeth
1b735a5c17
[winpr,utils] add JSON parser wrapper
as we now support cJSON and json-c we need to wrap the functions we use.
also allows drop in replacements for older cJSON versions lacking
certain functions.
2024-05-14 20:45:25 +02:00
akallabeth
b6db375b9b [winpr,utils] fix libjpeg const cast
libjpeg API is not const correct, so we need to cast away const
fixes #10175
2024-05-12 20:30:25 +02:00
akallabeth
15fc460c6f [winpr,timezone] remove struct from struct DIR
fix #10176
2024-05-12 20:19:13 +02:00
akallabeth
a86ca848d5 [winpr,timezone] fix NULL strdup 2024-05-12 20:17:06 +02:00
Armin Novak
e272eb3966 [warnings] fix Wshadow warnings 2024-05-08 15:30:01 +02:00
akallabeth
1b8221e5bf [warnings] fix various minor warnings 2024-05-08 14:53:39 +02:00
Armin Novak
474e3fa983 [winpr,timezone] fix missing const 2024-05-08 14:53:39 +02:00
akallabeth
95a7f5019a [winpr,timezone] fix clang-tidy warnings 2024-05-08 10:08:08 +02:00
akallabeth
f9443a080e [utils,doc] update timezone sync procedure
* add new C# utility to generate timezone mappings
* update procedure to follow for updating timezones
* remove obsolete TimeZones.csx script
* update generated files with new tool
2024-05-08 10:08:08 +02:00
akallabeth
277907d810 [winpr,timezone] add C# timezone extractor 2024-05-08 10:08:08 +02:00
akallabeth
cd18532f45 [winpr,timezone] add IANA to short mapping
* Add a generator for IANA and short zone name mappings.
* Add a function to get all IANA mappings for a short zone name.
2024-05-08 10:08:08 +02:00
akallabeth
52a884ed2e [winpr,timezone] refactor timezone mapping
* add option to use ICU as a fallback mapping (eliminate need for
  WindowsZones mapping list)
* extract timezone related settings from localtime_r and eliminate the
  need to parse the complex TimeZones table
* Add new TimeZoneNameMap to map IANA to windows names (Id, Standard,
  Daylight and Display names)
* Implement GetDynamicTimeZoneInformation
2024-05-08 10:08:08 +02:00
akallabeth
3049181d9b [winpr,sspi] skip IP addresses for kerberos auth
kerberos requires hostnames to authenticate, if we connect with a IP
address do not try kerberos based authentication
2024-05-07 10:38:30 +02:00
akallabeth
9b6fcf728a [winpr,asn1] fix undefined shift 2024-05-03 09:39:13 +02:00
akallabeth
8b382c8cec [winpr,timezone] update
* update windowsZones.xml url
* update timezones
2024-04-23 09:54:52 +02:00
akallabeth
fed8943447 [pkcs11.h] remove extra-semi-stmt 2024-04-22 18:02:03 +02:00
Ondrej Holy
35d8bc1782 [winpr,ncrypt] use preferably p11-kit-proxy.so
Currently, the opensc-pkcs11.so library is used for ncrypt support.
However, the p11-kit-proxy.so library is able to aggregate more pkcs11
modules at runtime (OpenSC is one of them, but also some third party
modules that are not supported by OpenSC). Let's use preferably
p11-kit-proxy.so if available.
2024-04-22 17:42:52 +02:00
Ondrej Holy
5a28b046d5 [winpr,ncrypt] bundle pkcs11.h and drop pkcs11-helper dependency
The ncrypt implementation currently relies on the pkcs11-helper library.
That is not available on RHEL for example. Let's bundle the standardized
header file from https://github.com/latchset/pkcs11-headers to avoid the
need for extra dependency.

Related: https://github.com/FreeRDP/FreeRDP/discussions/9982
2024-04-22 17:42:52 +02:00
Ondrej Holy
cef3d5e9d4 [winpr,ncrypt] replace deprecated symbol
The CKK_ECDSA symbol is deprecated, it is recommended to use CKK_EC
instead. Let's do this as a preparation for the follow-up changes.
2024-04-22 17:42:52 +02:00
Ondrej Holy
73991c48ce [winpr,ncrypt] obtain module path from provider
Currently, the module path is hardcoded in the build_pkinit_args function.
Let's obtain the module path from provider as a preparation for the
follow-up changes.
2024-04-22 17:42:52 +02:00
Ondrej Holy
79975cfbe3 [winpr,ncrypt] drop redundant library paths
The pkcs11 implementaion contains a list of the standard library paths
for various architectures and distribution. But that list also contains
just the opensc-pkcs11.so basename without path. Therefor I am conviced
that all those other entries can be simply dropped. Let's do that as
a preparation for the follow-up changes.
2024-04-22 17:42:52 +02:00
akallabeth
a1a8f832f4 [winpr,synch] fix extra-semi warning 2024-04-22 17:41:46 +02:00
akallabeth
1687a6424a start-3.5.2-dev0 2024-04-22 11:18:39 +02:00
akallabeth
eda5c99686 release-3.5.1 2024-04-22 11:18:39 +02:00
akallabeth
4e756306b9 [winpr,timezone] fix unused result warnings 2024-04-21 11:00:47 +02:00
Mike Gilbert
445bd9a80c winpr: fix fallback timezone name
Populate StandardName and DaylightName with 2-byte WCHAR values instead
of 4-byte wchar_t values on Linux.
2024-04-20 21:19:59 +02:00
Mike Gilbert
ca8c71a208 winpr: improve timezone detection when TZ is set
The TZ variable may either contain a direct timezone representation, or
a reference to a file in tzfile(5) format. Mapping a direct timezone
representation to a Windows timezone would be difficult.

According to tzset(3), a file reference should start with a colon, though
glibc treats it as optional. It may be an absolute path or a path relative
to /usr/share/zoneinfo. Adjust winpr_detect_windows_time_zone to accept
either.
2024-04-20 21:19:59 +02:00
akallabeth
71e78bedd7 [warnings] fixed sign and const
* fix various char/BYTE sign warnings
* fix various const warnings
* fix format string size_t
* remove unused CMake variables
2024-04-18 11:05:58 +02:00
Armin Novak
7f896b649e [winpr,clipboard] fix resource leak 2024-04-17 18:47:16 +02:00
Armin Novak
28e9094f08 [gcc] fix missing malloc warning macros
* Add missing WINPR_ATTR_MALLOC
* Add missing WINPR_PRAGMA_DIAG_IGNORED_MISMATCHED_DEALLOC
2024-04-17 18:47:16 +02:00
akallabeth
fdc253e909 start 3.5.1-dev0 cycle 2024-04-16 21:20:04 +02:00
akallabeth
cab5adde26 release-3.5.0 2024-04-16 21:20:04 +02:00
Armin Novak
2500fb7bfb [cleanup] refactor some checks 2024-04-15 12:40:01 +02:00
Armin Novak
140b4d7fcb [coverity] 1543161 Data race condition 2024-04-15 12:40:01 +02:00
Armin Novak
237dfcbd9f [coverity] 1543163 Unintentional integer overflow 2024-04-15 11:30:31 +02:00
Armin Novak
a75ddcc091 [coverity] 1543036 Unintentional integer overflow 2024-04-15 11:30:31 +02:00
Armin Novak
98fa2d406d [coverity] 1543226 Data race condition 2024-04-15 11:30:31 +02:00
Armin Novak
e4498df607 [coverity] 1543089 Data race condition 2024-04-15 11:30:31 +02:00
Armin Novak
e3f3f85391 [coverity] 1543117 Argument cannot be negative 2024-04-15 11:30:31 +02:00