From 3390bd7e4598b16d9e369217248d25db70693f15 Mon Sep 17 00:00:00 2001 From: anuragagarwal561994 Date: Fri, 19 Aug 2016 01:15:02 +0530 Subject: [PATCH 1/3] Uses PAM CMake Module --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d9bce50..cea56f54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,13 +124,13 @@ if (${ONION_USE_XML2}) endif(${ONION_USE_XML2}) if (${ONION_USE_PAM}) - find_library(PAM_LIB NAMES pam PATH ${LIBPATH}) - if (PAM_LIB) + find_package(PAM) + if (PAM_FOUND) set(PAM_ENABLED true) - message(STATUS "pam found. PAM support is compiled in in handlers.") - else (PAM_LIB) - message("pam not found. No PAM support.") - endif (PAM_LIB) + message(STATUS "PAM support is compiled in in handlers.") + else (PAM_FOUND) + message("No PAM support.") + endif (PAM_FOUND) endif (${ONION_USE_PAM}) if (${ONION_USE_PNG}) From dcbdce5f60ea1c0169e77ee0da2ae9f895a7238f Mon Sep 17 00:00:00 2001 From: anuragagarwal561994 Date: Fri, 19 Aug 2016 01:16:42 +0530 Subject: [PATCH 2/3] Fixes a typo in PAM found status message --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cea56f54..b8dd8bff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -127,7 +127,7 @@ if (${ONION_USE_PAM}) find_package(PAM) if (PAM_FOUND) set(PAM_ENABLED true) - message(STATUS "PAM support is compiled in in handlers.") + message(STATUS "PAM support is compiled in handlers.") else (PAM_FOUND) message("No PAM support.") endif (PAM_FOUND) From ec1c9ea2030029337101423578d82af205dfb4f0 Mon Sep 17 00:00:00 2001 From: anuragagarwal561994 Date: Fri, 19 Aug 2016 01:39:40 +0530 Subject: [PATCH 3/3] Fixes #206 --- tests/01-internal/14-websockets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/01-internal/14-websockets.c b/tests/01-internal/14-websockets.c index 25645c8c..c5b8b606 100644 --- a/tests/01-internal/14-websockets.c +++ b/tests/01-internal/14-websockets.c @@ -187,7 +187,7 @@ void t02_websocket_server_w_ws(){ void t03_websocket_server_receive_small_packet(){ INIT_LOCAL(); int length = 0; - char *buffer = NULL, buffer2[114]; + char *buffer = NULL, buffer2[115]; memset(&ws_status,0,sizeof(ws_status)); onion *o=websocket_server_new(); onion_request *req=websocket_start_handshake(o); @@ -201,7 +201,7 @@ void t03_websocket_server_receive_small_packet(){ onion_websocket_read(ws, (char *)&buffer2, 120); - buffer2[113] = '\0'; + buffer2[114] = '\0'; FAIL_IF_NOT_EQUAL_STR(buffer2, "Some UTF-8-encoded chars which will be cut at the 117th char so I write some gap-filling text with no meaning unti"); onion_websocket_free(ws);