Commit Graph

3865 Commits

Author SHA1 Message Date
akallabeth
57ed259be2
[warnings] fix integer narrowing 2024-10-03 21:21:41 +02:00
akallabeth
b19dcf8d68
[warnings] fix integer narrowing 2024-10-03 21:21:41 +02:00
akallabeth
eceab9aedb
[warnings] fix integer narrowing 2024-10-03 21:21:40 +02:00
akallabeth
704597937d
[warnings] fix integer narrowing 2024-10-03 21:21:39 +02:00
akallabeth
6c8c67b385
Merge pull request #10677 from akallabeth/int-narrow
Int narrow
2024-10-03 21:17:56 +02:00
akallabeth
4783546582
[winpr,wlog] fix integer narrow 2024-10-03 18:58:41 +02:00
akallabeth
8a042b33d6
[winpr,utils] fix integer narrow 2024-10-03 18:58:39 +02:00
akallabeth
4a0f996d42
[winpr,timezone] fix integer narrow 2024-10-03 18:58:37 +02:00
akallabeth
57f69ad77d
[winpr,synch] fix integer narrow 2024-10-03 18:58:34 +02:00
akallabeth
22d1810e12
[winpr,sspi] fix integer narrow 2024-10-03 18:58:32 +02:00
akallabeth
a0dbb901df
[winpr,shell] fix integer narrow 2024-10-03 18:58:29 +02:00
akallabeth
cb2cbdabfe
[winpr,ncrypt] fix integer narrow 2024-10-03 18:58:26 +02:00
akallabeth
a5b80925e2
[winpr,interlocked] fix integer narrow 2024-10-03 18:58:23 +02:00
akallabeth
952076afb7
[winpr,crypto] fix integer narrow 2024-10-03 18:58:21 +02:00
akallabeth
67817886ab
[winpr,clipboard] fix integer narrow 2024-10-03 18:58:13 +02:00
Martin Fleisz
966ddd13df
Merge pull request #10694 from akallabeth/qa-fixes
Qa fixes
2024-10-03 13:09:06 +02:00
akallabeth
cfc37caeb8
[cmake] cleaning_configure_file
add a wrapper to automatically add generated files to clean target
2024-10-02 23:28:08 +02:00
Armin Novak
1f7ec7324d
[winpr,registry] use HKLM.reg relative to config home 2024-10-02 23:27:57 +02:00
Armin Novak
934cf668a2
[winpr,utils] use sam file relative to config home 2024-10-02 23:27:55 +02:00
Armin Novak
276e3d67e0
[winpr,path] add a function to get WinPR config file paths 2024-10-02 23:27:53 +02:00
Armin Novak
ac0acd0463
[winpr,path] add KNOWN_PATH_SYSTEM_CONFIG_HOME 2024-10-02 23:27:49 +02:00
akallabeth
582ff2c319
[winpr,wincrypt] fix a define typo 2024-10-01 13:05:41 +02:00
akallabeth
f6d71a592e
[winpr,assert] silence tautological-constant-out-of-range-compare
we do some assertions that can with correct code never trigger. (check
for a unsinged char > 256, ...)
2024-10-01 13:05:39 +02:00
akallabeth
9c33717522
[winpr,file] fix sign warnings 2024-10-01 13:05:25 +02:00
akallabeth
5f9ef68b07
[warnigs] fixed readability-non-const-parameter 2024-10-01 13:05:23 +02:00
akallabeth
574742bae8
[warnings] annotate readability-non-const-parameter 2024-10-01 13:05:19 +02:00
akallabeth
8a0194c105
[clang-tidy] annotate suspicious-memory-comparison 2024-10-01 13:05:11 +02:00
akallabeth
fa21806734
[winpr,error] fix sign of NTE_* defines 2024-10-01 13:05:04 +02:00
akallabeth
953aa6c436
[winpr,sspi] fix kerberos unused parameter warning 2024-10-01 13:04:35 +02:00
akallabeth
490ca0453b
[winpr,stream] use Stream_BufferAs instead of casting 2024-10-01 10:34:42 +02:00
akallabeth
47c5070805
Merge pull request #10635 from akallabeth/initialize-variables
Initialize variables
2024-09-30 16:04:20 +02:00
akallabeth
a820912a24
[winpr,utils] fix sterror_r detection and use 2024-09-30 15:41:50 +02:00
akallabeth
98e11c69c1
[winpr,ncrypt] add pragma to disable warning 2024-09-30 15:41:34 +02:00
akallabeth
9d478c2ce7
[winpr,crt] fix redundant casts 2024-09-30 09:32:04 +02:00
akallabeth
3825fe8135 [warnings] fix Wunreachable-code-break 2024-09-30 09:31:36 +02:00
akallabeth
f529345d84 [warnings] fix Wcast-qual 2024-09-30 09:31:36 +02:00
akallabeth
5e998bb078
[winpr,platfom] fix WINPR_PRAGMA_DIAG_IGNORED_UNUSED_MACRO 2024-09-24 20:35:28 +02:00
akallabeth
26003e59cc
[va_list] initialize with ={0}; 2024-09-24 11:06:18 +02:00
akallabeth
42e3c6fff8
[winpr,utils] fix winpr_strerror argument types
errno is of type int, so use a signed INT32 as argument type to avoid
warings with sign conversions
2024-09-20 10:57:21 +02:00
akallabeth
632e2180f7
[winpr,stream] rewrite stream read functions
Use a loop to shift in bytes to avoid casts.
2024-09-19 09:06:20 +02:00
Armin Novak
46457a5033
[winpr,stream] Add Stream_BufferAs macro
* Add Stream_BufferAs, Stream_ConstBufferAs, Stream_GetBufferAs and
  Stream_GetPointerAs to get a pointer to the stream pointer or buffer
  casted to a specific type.
* Use WINPR_STREAM_CAST in these new macros for proper cast according to
  C or C++
2024-09-19 09:06:13 +02:00
Armin Novak
bed6e7968e
[winpr,utils] fix plausibility checks in IniFile_Load_File 2024-09-18 11:47:01 +02:00
Armin Novak
58ea63fd84
[winpr,path] fix comparison of unsigned < 0 2024-09-18 11:47:01 +02:00
akallabeth
e2fbab750b
Merge pull request #10625 from akallabeth/bsd-fix
[winpr,library] implement GetModuleFileNameA
2024-09-18 09:45:23 +02:00
akallabeth
347ac5a941
[winpr,library] implement GetModuleFileNameA 2024-09-17 18:01:10 +02:00
akallabeth
586f40631f
[warnings] fix shorten-64-to-32 2024-09-17 16:13:48 +02:00
akallabeth
ca260e13bb
[winpr,asn1] fix sign extraction for ASN1 integer
ASN1 integer might not be full 32bit integers, so extract the sign from
the first byte and append 0x80000000 after the rest of the integer was
successfully read.
2024-09-17 10:03:50 +02:00
akallabeth
befa4233ad
[warnings] fixed bugprone-not-null-terminated-result 2024-09-16 08:22:42 +02:00
akallabeth
a19305569d
[assert] fix ULONG_MAX use
most of the time this was used to check ULONG limits. Replace with
correct UINT32_MAX
2024-09-16 08:22:40 +02:00
akallabeth
bb242b9a89
[return checks] fix use of WaitForSingleObject 2024-09-16 08:22:37 +02:00
akallabeth
965d231e49
[return checks] fix use of CloseHandle 2024-09-16 08:22:31 +02:00
akallabeth
cd18dea174
[return checks] fix use of unicode functions 2024-09-16 06:48:26 +02:00
akallabeth
94020c183c
[return checks] fix use of ResetEvent 2024-09-16 06:48:09 +02:00
akallabeth
7c8c14294f
[return checks] fix use of ReleaseMutex 2024-09-16 06:48:06 +02:00
akallabeth
7d67b8e204
[return checks] fix use of SetEvent 2024-09-16 06:47:58 +02:00
akallabeth
0d5bc92a2b
[warnings] fix apple iOS/macos 2024-09-15 19:47:13 +02:00
akallabeth
0de75b305c
[warnings] fix unchecked return 2024-09-15 10:19:56 +02:00
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