diff --git a/PAM/ssh/include/rublon/check_application.hpp b/PAM/ssh/include/rublon/check_application.hpp index 6817702..62e4156 100644 --- a/PAM/ssh/include/rublon/check_application.hpp +++ b/PAM/ssh/include/rublon/check_application.hpp @@ -55,6 +55,7 @@ class Status { std::string_view _appTypeKey = "/type"; std::string_view _paramSystemName = "/params/os"; std::string_view _paramSSHDBase = "/params/sshd_config/"; + std::string_view _configBase = "/config/"; public: Status() : _alloc{}, _data{&_alloc}, _statusUpdated{false} { @@ -95,7 +96,7 @@ class Status { void updateSSHDConfig() { using namespace std::string_view_literals; - constexpr auto keys = make_array("authenticationmethods"sv, + constexpr auto keys = make_array< std::string_view >("authenticationmethods"sv, "challengeresponseauthentication"sv, "kbdinteractiveauthentication"sv, "logingracetime"sv, @@ -171,7 +172,7 @@ class CheckApplication { public: tl::expected< int, Error > call(const CoreHandler_t & coreHandler, std::string_view systemToken) const { - memory::MonotonicStack_1k_Resource mr; + memory::MonotonicStack_2k_Resource mr; RapidJSONPMRAlloc alloc{&mr}; constexpr std::string_view api = "/api/app/init"; Status status; @@ -181,6 +182,7 @@ class CheckApplication { status.updateAppVersion(RUBLON_VERSION_STRING); status.updateSystemVersion(details::osName(&mr)); status.updateSSHDConfig(); + status.updateRublonConfig(); if(status.updated()) { auto & alloc = status.data().GetAllocator(); diff --git a/PAM/ssh/include/rublon/init.hpp b/PAM/ssh/include/rublon/init.hpp index e6dbcb3..ab798e6 100644 --- a/PAM/ssh/include/rublon/init.hpp +++ b/PAM/ssh/include/rublon/init.hpp @@ -60,7 +60,7 @@ class Init : public AuthenticationStep { params.AddMember("appVer", RUBLON_VERSION_STRING, alloc); if(not host.empty()) params.AddMember("hostName", Value{os.c_str(), static_cast< unsigned >(host.size()), alloc}, alloc); - if(not _session.inInteractiveMode()) + if(_session.inNonInteractiveMode()) params.AddMember("mode", "noninteractive", alloc); params.AddMember("os", Value{os.c_str(), static_cast< unsigned >(os.size()), alloc}, alloc); params.AddMember("userIP", Value{pam.ip().get(), alloc}, alloc); diff --git a/PAM/ssh/include/rublon/session.hpp b/PAM/ssh/include/rublon/session.hpp index 58a9e28..25dfa7f 100644 --- a/PAM/ssh/include/rublon/session.hpp +++ b/PAM/ssh/include/rublon/session.hpp @@ -130,7 +130,11 @@ class Session : public DefaultResource { return systemToken().data(); } - bool inInteractiveMode() const { + constexpr bool inNonInteractiveMode() const { + return not inInteractiveMode(); + } + + constexpr bool inInteractiveMode() const { return _config.nonInteractiveMode == false; }