Skip to content

Commit

Permalink
Various fixes / improvements (FreeRDP#8146)
Browse files Browse the repository at this point in the history
* xfreerdp: fix typo in logs

* winpr: file appender, small code cleanup

* shadow-server: add an option for TLS secrets

This allows to dissect connections to the shadow server.
  • Loading branch information
hardening authored Aug 22, 2022
1 parent 95b4d3c commit 4fc7a94
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/X11/xf_graphics.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static BOOL xf_Pointer_GetCursorForCurrentScale(rdpContext* context, rdpPointer*
yTargetSize = pointer->height * yscale;

WLog_DBG(TAG, "%s: scaled: %" PRIu32 "x%" PRIu32 ", desktop: %" PRIu32 "x%" PRIu32, __func__,
xfc->scaledWidth, xfc->savedHeight, settings->DesktopWidth, settings->DesktopHeight);
xfc->scaledWidth, xfc->scaledHeight, settings->DesktopWidth, settings->DesktopHeight);
for (i = 0; i < xpointer->nCursors; i++)
{
if ((xpointer->cursorWidths[i] == xTargetSize) &&
Expand Down
2 changes: 2 additions & 0 deletions server/shadow/shadow.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ int main(int argc, char** argv)
"Kerberos keytab file for NLA authentication" },
{ "ccache", COMMAND_LINE_VALUE_REQUIRED, "<file>", NULL, NULL, -1, NULL,
"Kerberos host ccache file for NLA authentication" },
{ "tls-secrets-file", COMMAND_LINE_VALUE_REQUIRED, "<file>", NULL, NULL, -1, NULL,
"file where tls secrets shall be stored" },
{ "gfx-progressive", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL,
"Allow GFX progressive codec" },
{ "gfx-rfx", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL,
Expand Down
5 changes: 5 additions & 0 deletions server/shadow/shadow_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,11 @@ int shadow_server_parse_command_line(rdpShadowServer* server, int argc, char** a
if (!freerdp_settings_set_string(settings, FreeRDP_KerberosCache, arg->Value))
return COMMAND_LINE_ERROR;
}
CommandLineSwitchCase(arg, "tls-secrets-file")
{
if (!freerdp_settings_set_string(settings, FreeRDP_TlsSecretsFile, arg->Value))
return COMMAND_LINE_ERROR;
}
CommandLineSwitchDefault(arg)
{
}
Expand Down
7 changes: 3 additions & 4 deletions winpr/libwinpr/utils/wlog/FileAppender.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,11 @@ static BOOL WLog_FileAppender_Set(wLogAppender* appender, const char* setting, v

if (!strcmp("outputfilename", setting))
return WLog_FileAppender_SetOutputFileName(fileAppender, (const char*)value);
else if (!strcmp("outputfilepath", setting))

if (!strcmp("outputfilepath", setting))
return WLog_FileAppender_SetOutputFilePath(fileAppender, (const char*)value);
else
return FALSE;

return TRUE;
return FALSE;
}

static void WLog_FileAppender_Free(wLogAppender* appender)
Expand Down

0 comments on commit 4fc7a94

Please sign in to comment.