From e9af573d58f005b43c2fcbfd642beb1d7e168a27 Mon Sep 17 00:00:00 2001 From: Bernhard Miklautz Date: Wed, 25 Jul 2012 12:39:54 +0200 Subject: [PATCH 1/4] Fix for #629. Don't show password if --from-stdin. --- libfreerdp-utils/args.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libfreerdp-utils/args.c b/libfreerdp-utils/args.c index 1a5b39125..cb35db9ce 100644 --- a/libfreerdp-utils/args.c +++ b/libfreerdp-utils/args.c @@ -26,6 +26,7 @@ #include #include #include +#include void freerdp_parse_hostname(rdpSettings* settings, char* hostname) { @@ -764,10 +765,8 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, } /* password */ if (NULL == settings->password) { - char input[512]; - printf("password: "); - scanf("%511s", input); - settings->password = xstrdup(input); + settings->password = xmalloc(512 * sizeof(char)); + freerdp_passphrase_read("password: ", settings->password, 512, settings->from_stdin); } /* domain */ if (NULL == settings->domain) { From 2f9f63acc052cfb47eeef5f9fb8ca758cb47ba87 Mon Sep 17 00:00:00 2001 From: Vic Lee Date: Mon, 13 Aug 2012 09:54:50 +0800 Subject: [PATCH 2/4] libfreerdp-utils: fix a memory leak. --- libfreerdp-utils/wait_obj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libfreerdp-utils/wait_obj.c b/libfreerdp-utils/wait_obj.c index c9bccf37b..d73a5c2ba 100644 --- a/libfreerdp-utils/wait_obj.c +++ b/libfreerdp-utils/wait_obj.c @@ -215,6 +215,7 @@ wait_obj_select(struct wait_obj** listobj, int numobj, int timeout) status = -1; else status = 0; + xfree(hnds); #endif return status; From 1847d0acfd1ee9f4d3db4e8b945df62e615208c6 Mon Sep 17 00:00:00 2001 From: Vic Lee Date: Mon, 13 Aug 2012 17:16:03 +0800 Subject: [PATCH 3/4] cmake: add missing include path for generated config.h --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bbbd5e9bc..feed88dc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,6 +160,7 @@ set(FREERDP_EXTENSION_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/free # Include directories include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/include) include_directories(${CMAKE_SOURCE_DIR}/include) # Configure files From 6d431d7a28a84b0f723c4af6fdd3c64672aff86f Mon Sep 17 00:00:00 2001 From: Vic Lee Date: Mon, 13 Aug 2012 17:24:52 +0800 Subject: [PATCH 4/4] cmake: in case build path is different config.h needs to be install separately. --- include/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index fce03ec18..aa5087487 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -34,3 +34,6 @@ install(DIRECTORY freerdp/server DESTINATION include/freerdp FILES_MATCHING PATT file(GLOB HEADERS "winpr/*.h") install_files(/include/winpr FILES ${HEADERS}) + +file(GLOB HEADERS "${CMAKE_CURRENT_BINARY_DIR}/freerdp/*.h") +install_files(/include/freerdp FILES ${HEADERS})