diff --git a/cmake/FindPAM.cmake b/cmake/FindPAM.cmake index 178ac40fa..e0f069832 100644 --- a/cmake/FindPAM.cmake +++ b/cmake/FindPAM.cmake @@ -7,8 +7,8 @@ find_path(PAM_INCLUDE_DIR pam_appl.h PATH_SUFFIXES security) find_library(PAM_LIBRARIES NAMES pam) -message(STATUS "Found PAM include dirs: ${PAM_INCLUDE_DIR}") if (PAM_INCLUDE_DIR AND PAM_LIBRARIES) + message(STATUS "Found PAM headers: ${PAM_INCLUDE_DIR}") message(STATUS "Found PAM: ${PAM_LIBRARIES}") set(PAM_FOUND TRUE CACHE INTERNAL "") else() diff --git a/server/modules/authenticator/PAM/PAMAuth/pam_client_session.cc b/server/modules/authenticator/PAM/PAMAuth/pam_client_session.cc index 9881c63e3..d9c7af1f8 100644 --- a/server/modules/authenticator/PAM/PAMAuth/pam_client_session.cc +++ b/server/modules/authenticator/PAM/PAMAuth/pam_client_session.cc @@ -358,8 +358,10 @@ bool PamClientSession::extract(DCB *dcb, GWBUF *buffer) break; case PAM_AUTH_DATA_SENT: - store_client_password(dcb, buffer); - rval = true; + if (store_client_password(dcb, buffer)) + { + rval = true; + } break; default: diff --git a/server/modules/authenticator/PAM/PAMBackendAuth/pam_backend_auth.hh b/server/modules/authenticator/PAM/PAMBackendAuth/pam_backend_auth.hh index 9a439eab4..7e172f230 100644 --- a/server/modules/authenticator/PAM/PAMBackendAuth/pam_backend_auth.hh +++ b/server/modules/authenticator/PAM/PAMBackendAuth/pam_backend_auth.hh @@ -1,3 +1,4 @@ +#pragma once /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -14,9 +15,6 @@ /** * Common definitions and includes for PAMBackendAuth */ -#ifndef PAM_BACKEND_AUTH_HH -#define PAM_BACKEND_AUTH_HH - #define MXS_MODULE_NAME "PAMBackendAuth" #include @@ -24,6 +22,3 @@ #include #include #include - -#endif /* PAM_BACKEND_AUTH_HH */ - diff --git a/server/modules/authenticator/PAM/PAMBackendAuth/pam_backend_session.hh b/server/modules/authenticator/PAM/PAMBackendAuth/pam_backend_session.hh index 66cb910b1..7fb3c6246 100644 --- a/server/modules/authenticator/PAM/PAMBackendAuth/pam_backend_session.hh +++ b/server/modules/authenticator/PAM/PAMBackendAuth/pam_backend_session.hh @@ -1,3 +1,4 @@ +#pragma once /* * Copyright (c) 2016 MariaDB Corporation Ab * @@ -10,10 +11,6 @@ * of this software will be governed by version 2 or later of the General * Public License. */ - -#ifndef PAMBACKENDSESSION_HH -#define PAMBACKENDSESSION_HH - #include "pam_backend_auth.hh" #include @@ -34,6 +31,3 @@ private: pam_auth_state m_state; /**< Authentication state*/ uint8_t m_sequence; /**< The next packet seqence number */ }; - -#endif /* PAMBACKENDSESSION_HH */ -