21#include <freerdp/config.h>
26#include <winpr/assert.h>
29#include <winpr/path.h>
30#include <winpr/cmdline.h>
31#include <winpr/winsock.h>
33#include <freerdp/log.h>
34#include <freerdp/version.h>
36#include <winpr/tools/makecert.h>
39#include <sys/select.h>
45#define TAG SERVER_TAG("shadow")
47static const char bind_address[] =
"bind-address,";
49#define fail_at(arg, rc) fail_at_((arg), (rc), __FILE__, __func__, __LINE__)
53 const DWORD level = WLOG_ERROR;
54 wLog* log = WLog_Get(TAG);
55 if (WLog_IsLevelActive(log, level))
56 WLog_PrintMessage(log, WLOG_MESSAGE_TEXT, level, line, file, fkt,
57 "Command line parsing failed at '%s' value '%s' [%d]", arg->Name,
62static int command_line_compare(
const void* pa,
const void* pb)
74 return strcmp(a->Name, b->Name);
77static int shadow_server_print_command_line_help(
int argc,
char** argv,
80 if ((argc < 1) || !largs || !argv)
84 char* path = winpr_GetConfigFilePath(TRUE,
"SAM");
85 printf(
"Usage: %s [options]\n", argv[0]);
87 printf(
"Notes: By default NLA security is active.\n");
88 printf(
"\tIn this mode a SAM database is required.\n");
89 printf(
"\tProvide one with /sam-file:<file with path>\n");
90 printf(
"\telse the default path %s is used.\n", path);
91 printf(
"\tIf there is no existing SAM file authentication for all users will fail.\n");
92 printf(
"\n\tIf authentication against PAM is desired, start with -sec-nla (requires "
94 "support for PAM)\n\n");
96 printf(
" /flag (enables flag)\n");
97 printf(
" /option:<value> (specifies option with value)\n");
98 printf(
" +toggle -toggle (enables or disables toggle, where '/' is a synonym of '+')\n");
107 while (arg->Name != NULL)
125 if (arg->Flags & COMMAND_LINE_VALUE_FLAG)
128 printf(
"%-20s\n", arg->Name);
129 printf(
"\t%s\n", arg->Text);
131 else if ((arg->Flags & COMMAND_LINE_VALUE_REQUIRED) ||
132 (arg->Flags & COMMAND_LINE_VALUE_OPTIONAL))
138 const size_t length = (strlen(arg->Name) + strlen(arg->Format) + 2);
139 char* str = (
char*)calloc(length + 1,
sizeof(
char));
144 (void)sprintf_s(str, length + 1,
"%s:%s", arg->Name, arg->Format);
145 (void)printf(
"%-20s\n", str);
150 printf(
"%-20s\n", arg->Name);
153 printf(
"\t%s\n", arg->Text);
155 else if (arg->Flags & COMMAND_LINE_VALUE_BOOL)
157 const size_t length = strlen(arg->Name) + 32;
158 char* str = calloc(length + 1,
sizeof(
char));
163 (void)sprintf_s(str, length + 1,
"%s (default:%s)", arg->Name,
164 arg->Default ?
"on" :
"off");
165 (void)printf(
" %s", arg->Default ?
"-" :
"+");
166 (void)printf(
"%-20s\n", str);
167 (void)printf(
"\t%s\n", arg->Text);
171 }
while ((arg = CommandLineFindNextArgumentA(arg)) != NULL);
179int shadow_server_command_line_status_print(rdpShadowServer* server,
int argc,
char** argv,
182 WINPR_UNUSED(server);
184 if (status == COMMAND_LINE_STATUS_PRINT_VERSION)
186 printf(
"FreeRDP version %s (git %s)\n", FREERDP_VERSION_FULL, FREERDP_GIT_REVISION);
187 return COMMAND_LINE_STATUS_PRINT_VERSION;
189 else if (status == COMMAND_LINE_STATUS_PRINT_BUILDCONFIG)
191 printf(
"%s\n", freerdp_get_build_config());
192 return COMMAND_LINE_STATUS_PRINT_BUILDCONFIG;
194 else if (status == COMMAND_LINE_STATUS_PRINT)
196 return COMMAND_LINE_STATUS_PRINT;
200 if (shadow_server_print_command_line_help(argc, argv, cargs) < 0)
203 return COMMAND_LINE_STATUS_PRINT_HELP;
209int shadow_server_parse_command_line(rdpShadowServer* server,
int argc,
char** argv,
215 rdpSettings* settings = server->settings;
217 if ((argc < 2) || !argv || !cargs)
220 CommandLineClearArgumentsA(cargs);
221 flags = COMMAND_LINE_SEPARATOR_COLON;
222 flags |= COMMAND_LINE_SIGIL_SLASH | COMMAND_LINE_SIGIL_PLUS_MINUS;
223 status = CommandLineParseArgumentsA(argc, argv, cargs, flags, server, NULL, NULL);
233 if (!(arg->Flags & COMMAND_LINE_ARGUMENT_PRESENT))
236 CommandLineSwitchStart(arg) CommandLineSwitchCase(arg,
"port")
238 long val = strtol(arg->Value, NULL, 0);
240 if ((errno != 0) || (val <= 0) || (val > UINT16_MAX))
241 return fail_at(arg, COMMAND_LINE_ERROR);
243 server->port = (DWORD)val;
245 CommandLineSwitchCase(arg,
"ipc-socket")
248 if (server->ipcSocket)
249 return fail_at(arg, COMMAND_LINE_ERROR);
250 server->ipcSocket = _strdup(arg->Value);
252 if (!server->ipcSocket)
253 return fail_at(arg, COMMAND_LINE_ERROR);
255 CommandLineSwitchCase(arg,
"bind-address")
258 size_t len = strlen(arg->Value) +
sizeof(bind_address);
260 if (server->ipcSocket)
261 return fail_at(arg, COMMAND_LINE_ERROR);
262 server->ipcSocket = calloc(len,
sizeof(CHAR));
264 if (!server->ipcSocket)
265 return fail_at(arg, COMMAND_LINE_ERROR);
267 rc = _snprintf(server->ipcSocket, len,
"%s%s", bind_address, arg->Value);
268 if ((rc < 0) || ((
size_t)rc != len - 1))
269 return fail_at(arg, COMMAND_LINE_ERROR);
271 CommandLineSwitchCase(arg,
"may-view")
273 server->mayView = arg->Value ? TRUE : FALSE;
275 CommandLineSwitchCase(arg,
"bitmap-compat")
277 server->SupportMultiRectBitmapUpdates = arg->Value ? FALSE : TRUE;
279 CommandLineSwitchCase(arg,
"may-interact")
281 server->mayInteract = arg->Value ? TRUE : FALSE;
283 CommandLineSwitchCase(arg,
"server-side-cursor")
285 server->ShowMouseCursor = arg->Value ? TRUE : FALSE;
287 CommandLineSwitchCase(arg,
"mouse-relative")
289 const BOOL val = arg->Value ? TRUE : FALSE;
292 return fail_at(arg, COMMAND_LINE_ERROR);
294 CommandLineSwitchCase(arg,
"max-connections")
297 unsigned long val = strtoul(arg->Value, NULL, 0);
299 if ((errno != 0) || (val > UINT32_MAX))
300 return fail_at(arg, COMMAND_LINE_ERROR);
301 server->maxClientsConnected = val;
303 CommandLineSwitchCase(arg,
"rect")
311 char* str = _strdup(arg->Value);
314 return fail_at(arg, COMMAND_LINE_ERROR);
317 p = strchr(p + 1,
',');
322 return fail_at(arg, COMMAND_LINE_ERROR);
327 p = strchr(p + 1,
',');
332 return fail_at(arg, COMMAND_LINE_ERROR);
337 p = strchr(p + 1,
',');
342 return fail_at(arg, COMMAND_LINE_ERROR);
347 x = strtol(tok[0], NULL, 0);
352 y = strtol(tok[1], NULL, 0);
357 w = strtol(tok[2], NULL, 0);
362 h = strtol(tok[3], NULL, 0);
370 if ((x < 0) || (y < 0) || (w < 1) || (h < 1) || (errno != 0))
371 return fail_at(arg, COMMAND_LINE_ERROR);
373 if ((x > UINT16_MAX) || (y > UINT16_MAX) || (x + w > UINT16_MAX) ||
374 (y + h > UINT16_MAX))
375 return fail_at(arg, COMMAND_LINE_ERROR);
376 server->subRect.left = (UINT16)x;
377 server->subRect.top = (UINT16)y;
378 server->subRect.right = (UINT16)(x + w);
379 server->subRect.bottom = (UINT16)(y + h);
380 server->shareSubRect = TRUE;
382 CommandLineSwitchCase(arg,
"auth")
384 server->authentication = arg->Value ? TRUE : FALSE;
386 CommandLineSwitchCase(arg,
"remote-guard")
389 arg->Value ? TRUE : FALSE))
390 return fail_at(arg, COMMAND_LINE_ERROR);
392 CommandLineSwitchCase(arg,
"sec")
394 if (strcmp(
"rdp", arg->Value) == 0)
397 return fail_at(arg, COMMAND_LINE_ERROR);
399 return fail_at(arg, COMMAND_LINE_ERROR);
401 return fail_at(arg, COMMAND_LINE_ERROR);
403 return fail_at(arg, COMMAND_LINE_ERROR);
405 return fail_at(arg, COMMAND_LINE_ERROR);
407 else if (strcmp(
"tls", arg->Value) == 0)
410 return fail_at(arg, COMMAND_LINE_ERROR);
412 return fail_at(arg, COMMAND_LINE_ERROR);
414 return fail_at(arg, COMMAND_LINE_ERROR);
416 return fail_at(arg, COMMAND_LINE_ERROR);
418 else if (strcmp(
"nla", arg->Value) == 0)
421 return fail_at(arg, COMMAND_LINE_ERROR);
423 return fail_at(arg, COMMAND_LINE_ERROR);
425 return fail_at(arg, COMMAND_LINE_ERROR);
427 return fail_at(arg, COMMAND_LINE_ERROR);
429 else if (strcmp(
"ext", arg->Value) == 0)
432 return fail_at(arg, COMMAND_LINE_ERROR);
434 return fail_at(arg, COMMAND_LINE_ERROR);
436 return fail_at(arg, COMMAND_LINE_ERROR);
438 return fail_at(arg, COMMAND_LINE_ERROR);
442 WLog_ERR(TAG,
"unknown protocol security: %s", arg->Value);
443 return fail_at(arg, COMMAND_LINE_ERROR_UNEXPECTED_VALUE);
446 CommandLineSwitchCase(arg,
"sec-rdp")
449 arg->Value ? TRUE : FALSE))
450 return fail_at(arg, COMMAND_LINE_ERROR);
452 CommandLineSwitchCase(arg,
"sec-tls")
455 arg->Value ? TRUE : FALSE))
456 return fail_at(arg, COMMAND_LINE_ERROR);
458 CommandLineSwitchCase(arg,
"sec-nla")
461 arg->Value ? TRUE : FALSE))
462 return fail_at(arg, COMMAND_LINE_ERROR);
464 CommandLineSwitchCase(arg,
"sec-ext")
467 arg->Value ? TRUE : FALSE))
468 return fail_at(arg, COMMAND_LINE_ERROR);
470 CommandLineSwitchCase(arg,
"sam-file")
473 return fail_at(arg, COMMAND_LINE_ERROR);
475 CommandLineSwitchCase(arg,
"log-level")
477 wLog* root = WLog_GetRoot();
479 if (!WLog_SetStringLogLevel(root, arg->Value))
480 return fail_at(arg, COMMAND_LINE_ERROR);
482 CommandLineSwitchCase(arg,
"log-filters")
484 if (!WLog_AddStringLogFilters(arg->Value))
485 return fail_at(arg, COMMAND_LINE_ERROR);
487 CommandLineSwitchCase(arg,
"nsc")
490 return fail_at(arg, COMMAND_LINE_ERROR);
492 CommandLineSwitchCase(arg,
"rfx")
495 arg->Value ? TRUE : FALSE))
496 return fail_at(arg, COMMAND_LINE_ERROR);
498 CommandLineSwitchCase(arg,
"gfx")
501 arg->Value ? TRUE : FALSE))
502 return fail_at(arg, COMMAND_LINE_ERROR);
504 CommandLineSwitchCase(arg,
"gfx-progressive")
507 arg->Value ? TRUE : FALSE))
508 return fail_at(arg, COMMAND_LINE_ERROR);
510 CommandLineSwitchCase(arg,
"gfx-rfx")
513 arg->Value ? TRUE : FALSE))
514 return fail_at(arg, COMMAND_LINE_ERROR);
516 CommandLineSwitchCase(arg,
"gfx-planar")
519 return fail_at(arg, COMMAND_LINE_ERROR);
521 CommandLineSwitchCase(arg,
"gfx-avc420")
524 return fail_at(arg, COMMAND_LINE_ERROR);
526 CommandLineSwitchCase(arg,
"gfx-avc444")
529 arg->Value ? TRUE : FALSE))
530 return fail_at(arg, COMMAND_LINE_ERROR);
532 return fail_at(arg, COMMAND_LINE_ERROR);
534 CommandLineSwitchCase(arg,
"keytab")
537 return fail_at(arg, COMMAND_LINE_ERROR);
539 CommandLineSwitchCase(arg,
"ccache")
542 return fail_at(arg, COMMAND_LINE_ERROR);
544 CommandLineSwitchCase(arg,
"tls-secrets-file")
547 return fail_at(arg, COMMAND_LINE_ERROR);
549 CommandLineSwitchDefault(arg)
552 CommandLineSwitchEnd(arg)
553 }
while ((arg = CommandLineFindNextArgumentA(arg)) != NULL);
555 arg = CommandLineFindArgumentA(cargs,
"monitors");
557 if (arg && (arg->Flags & COMMAND_LINE_ARGUMENT_PRESENT))
559 UINT32 numMonitors = 0;
561 numMonitors = shadow_enum_monitors(monitors, 16);
563 if (arg->Flags & COMMAND_LINE_VALUE_PRESENT)
566 long val = strtol(arg->Value, NULL, 0);
568 if ((val < 0) || (errno != 0) || ((UINT32)val >= numMonitors))
569 status = COMMAND_LINE_STATUS_PRINT;
571 server->selectedMonitor = (UINT32)val;
577 for (UINT32 index = 0; index < numMonitors; index++)
580 const INT64 width = monitor->right - monitor->left + 1;
581 const INT64 height = monitor->bottom - monitor->top + 1;
582 WLog_INFO(TAG,
" %s [%d] %" PRId64
"x%" PRId64
"\t+%" PRId32
"+%" PRId32
"",
583 (monitor->flags == 1) ?
"*" :
" ", index, width, height, monitor->left,
587 status = COMMAND_LINE_STATUS_PRINT;
594 if (!server->authentication)
597 return COMMAND_LINE_ERROR;
602static DWORD WINAPI shadow_server_thread(LPVOID arg)
604 rdpShadowServer* server = (rdpShadowServer*)arg;
607 freerdp_listener* listener = server->listener;
608 shadow_subsystem_start(server->subsystem);
612 HANDLE events[MAXIMUM_WAIT_OBJECTS] = { 0 };
614 events[nCount++] = server->StopEvent;
615 nCount += listener->GetEventHandles(listener, &events[nCount], ARRAYSIZE(events) - nCount);
619 WLog_ERR(TAG,
"Failed to get FreeRDP file descriptor");
623 status = WaitForMultipleObjects(nCount, events, FALSE, INFINITE);
634 if (!listener->CheckFileDescriptor(listener))
636 WLog_ERR(TAG,
"Failed to check FreeRDP file descriptor");
650 listener->Close(listener);
651 shadow_subsystem_stop(server->subsystem);
655 if (shadow_client_boardcast_quit(server, 0))
657 while (ArrayList_Count(server->clients) > 0)
667static BOOL open_port(rdpShadowServer* server,
char* address)
670 char* modaddr = address;
674 if (modaddr[0] ==
'[')
676 char* end = strchr(address,
']');
679 WLog_ERR(TAG,
"Could not parse bind-address %s", address);
685 WLog_ERR(TAG,
"Excess data after IPv6 address: '%s'", end);
691 status = server->listener->Open(server->listener, modaddr, (UINT16)server->port);
696 "Problem creating TCP listener. (Port already used or insufficient permissions?)");
702int shadow_server_start(rdpShadowServer* server)
711 if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0)
715 (void)signal(SIGPIPE, SIG_IGN);
717 server->screen = shadow_screen_new(server);
721 WLog_ERR(TAG,
"screen_new failed");
725 server->capture = shadow_capture_new(server);
727 if (!server->capture)
729 WLog_ERR(TAG,
"capture_new failed");
739 ipc = server->ipcSocket && (strncmp(bind_address, server->ipcSocket,
740 strnlen(bind_address,
sizeof(bind_address))) != 0);
745 char** ptr = CommandLineParseCommaSeparatedValuesEx(NULL, server->ipcSocket, &count);
746 if (!ptr || (count <= 1))
748 if (server->ipcSocket == NULL)
750 if (!open_port(server, NULL))
752 CommandLineParserFree(ptr);
758 CommandLineParserFree(ptr);
763 WINPR_ASSERT(ptr || (count == 0));
764 for (
size_t x = 1; x < count; x++)
766 BOOL success = open_port(server, ptr[x]);
769 CommandLineParserFree(ptr);
773 CommandLineParserFree(ptr);
777 status = server->listener->OpenLocal(server->listener, server->ipcSocket);
781 WLog_ERR(TAG,
"Problem creating local socket listener. (Port already used or "
782 "insufficient permissions?)");
787 if (!(server->thread = CreateThread(NULL, 0, shadow_server_thread, (
void*)server, 0, NULL)))
795int shadow_server_stop(rdpShadowServer* server)
802 (void)SetEvent(server->StopEvent);
803 (void)WaitForSingleObject(server->thread, INFINITE);
804 (void)CloseHandle(server->thread);
805 server->thread = NULL;
806 if (server->listener && server->listener->Close)
807 server->listener->Close(server->listener);
812 shadow_screen_free(server->screen);
813 server->screen = NULL;
818 shadow_capture_free(server->capture);
819 server->capture = NULL;
825static int shadow_server_init_config_path(rdpShadowServer* server)
827 if (!server->ConfigPath)
833 if (!winpr_PathFileExists(configHome) && !winpr_PathMakePath(configHome, 0))
835 WLog_ERR(TAG,
"Failed to create directory '%s'", configHome);
840 server->ConfigPath = configHome;
844 if (!server->ConfigPath)
850static BOOL shadow_server_create_certificate(rdpShadowServer* server,
const char* filepath)
853 char* makecert_argv[6] = {
"makecert",
"-rdp",
"-live",
"-silent",
"-y",
"5" };
855 WINPR_STATIC_ASSERT(ARRAYSIZE(makecert_argv) <= INT_MAX);
856 const size_t makecert_argc = ARRAYSIZE(makecert_argv);
858 MAKECERT_CONTEXT* makecert = makecert_context_new();
863 if (makecert_context_process(makecert, (
int)makecert_argc, makecert_argv) < 0)
866 if (makecert_context_set_output_file_name(makecert,
"shadow") != 1)
869 WINPR_ASSERT(server);
870 WINPR_ASSERT(filepath);
871 if (!winpr_PathFileExists(server->CertificateFile))
873 if (makecert_context_output_certificate_file(makecert, filepath) != 1)
877 if (!winpr_PathFileExists(server->PrivateKeyFile))
879 if (makecert_context_output_private_key_file(makecert, filepath) != 1)
884 makecert_context_free(makecert);
887static BOOL shadow_server_init_certificate(rdpShadowServer* server)
889 char* filepath = NULL;
892 WINPR_ASSERT(server);
894 if (!winpr_PathFileExists(server->ConfigPath) && !winpr_PathMakePath(server->ConfigPath, 0))
896 WLog_ERR(TAG,
"Failed to create directory '%s'", server->ConfigPath);
900 if (!(filepath = GetCombinedPath(server->ConfigPath,
"shadow")))
903 if (!winpr_PathFileExists(filepath) && !winpr_PathMakePath(filepath, 0))
905 if (!CreateDirectoryA(filepath, 0))
907 WLog_ERR(TAG,
"Failed to create directory '%s'", filepath);
912 server->CertificateFile = GetCombinedPath(filepath,
"shadow.crt");
913 server->PrivateKeyFile = GetCombinedPath(filepath,
"shadow.key");
915 if (!server->CertificateFile || !server->PrivateKeyFile)
918 if ((!winpr_PathFileExists(server->CertificateFile)) ||
919 (!winpr_PathFileExists(server->PrivateKeyFile)))
921 if (!shadow_server_create_certificate(server, filepath))
925 rdpSettings* settings = server->settings;
926 WINPR_ASSERT(settings);
928 rdpPrivateKey* key = freerdp_key_new_from_file_enc(server->PrivateKeyFile, NULL);
934 rdpCertificate* cert = freerdp_certificate_new_from_file(server->CertificateFile);
941 if (!freerdp_certificate_is_rdp_security_compatible(cert))
954static BOOL shadow_server_check_peer_restrictions(freerdp_listener* listener)
956 WINPR_ASSERT(listener);
958 rdpShadowServer* server = (rdpShadowServer*)listener->info;
959 WINPR_ASSERT(server);
961 if (server->maxClientsConnected > 0)
963 const size_t count = ArrayList_Count(server->clients);
964 if (count >= server->maxClientsConnected)
966 WLog_WARN(TAG,
"connection limit [%" PRIuz
"] reached, discarding client",
967 server->maxClientsConnected);
974int shadow_server_init(rdpShadowServer* server)
977 winpr_InitializeSSL(WINPR_SSL_INIT_DEFAULT);
978 WTSRegisterWtsApiFunctionTable(FreeRDP_InitWtsApi());
980 if (!(server->clients = ArrayList_New(TRUE)))
983 if (!(server->StopEvent = CreateEvent(NULL, TRUE, FALSE, NULL)))
986 if (!InitializeCriticalSectionAndSpinCount(&(server->lock), 4000))
989 status = shadow_server_init_config_path(server);
994 if (!shadow_server_init_certificate(server))
997 server->listener = freerdp_listener_new();
999 if (!server->listener)
1002 server->listener->info = (
void*)server;
1003 server->listener->CheckPeerAcceptRestrictions = shadow_server_check_peer_restrictions;
1004 server->listener->PeerAccepted = shadow_client_accepted;
1005 server->subsystem = shadow_subsystem_new();
1007 if (!server->subsystem)
1010 status = shadow_subsystem_init(server->subsystem, server);
1017 shadow_server_uninit(server);
1018 WLog_ERR(TAG,
"Failed to initialize shadow server");
1022int shadow_server_uninit(rdpShadowServer* server)
1027 shadow_server_stop(server);
1028 shadow_subsystem_uninit(server->subsystem);
1029 shadow_subsystem_free(server->subsystem);
1030 server->subsystem = NULL;
1031 freerdp_listener_free(server->listener);
1032 server->listener = NULL;
1033 free(server->CertificateFile);
1034 server->CertificateFile = NULL;
1035 free(server->PrivateKeyFile);
1036 server->PrivateKeyFile = NULL;
1037 free(server->ConfigPath);
1038 server->ConfigPath = NULL;
1039 DeleteCriticalSection(&(server->lock));
1040 (void)CloseHandle(server->StopEvent);
1041 server->StopEvent = NULL;
1042 ArrayList_Free(server->clients);
1043 server->clients = NULL;
1047rdpShadowServer* shadow_server_new(
void)
1049 rdpShadowServer* server = NULL;
1050 server = (rdpShadowServer*)calloc(1,
sizeof(rdpShadowServer));
1055 server->SupportMultiRectBitmapUpdates = TRUE;
1056 server->port = 3389;
1057 server->mayView = TRUE;
1058 server->mayInteract = TRUE;
1059 server->h264RateControlMode = H264_RATECONTROL_VBR;
1060 server->h264BitRate = 10000000;
1061 server->h264FrameRate = 30;
1063 server->authentication = TRUE;
1068void shadow_server_free(rdpShadowServer* server)
1073 free(server->ipcSocket);
1074 server->ipcSocket = NULL;
1076 server->settings = NULL;
FREERDP_API BOOL freerdp_settings_set_string(rdpSettings *settings, FreeRDP_Settings_Keys_String id, const char *param)
Sets a string settings value. The param is copied.
FREERDP_API rdpSettings * freerdp_settings_new(DWORD flags)
creates a new setting struct
FREERDP_API BOOL freerdp_settings_set_pointer_len(rdpSettings *settings, FreeRDP_Settings_Keys_Pointer id, const void *data, size_t len)
Set a pointer to value data.
FREERDP_API void freerdp_settings_free(rdpSettings *settings)
Free a settings struct with all data in it.
#define FREERDP_SETTINGS_SERVER_MODE
FREERDP_API char * freerdp_settings_get_config_path(void)
return the configuration directory for the library
FREERDP_API BOOL freerdp_settings_set_bool(rdpSettings *settings, FreeRDP_Settings_Keys_Bool id, BOOL param)
Sets a BOOL settings value.