enable read ip from pam

This commit is contained in:
Bartosz Wieczorek 2025-08-08 14:57:11 +02:00
parent 076d2b84c1
commit a937bfd3da

View File

@ -64,9 +64,9 @@ class Init : public AuthenticationStep {
auto ip = pam.ip();
// ip has always a value, can be empty but the value should be set
/* if(ip.get() != ""sv){
if(ip.get() != ""sv){
params.AddMember("userIP", Value{pam.ip().get(), alloc}, alloc);
} else */{
} else {
getDefaultRouteIp(&memoryResource) //
.and_then([&](const auto & ip) {
params.AddMember("userIP", Value{ip.c_str(), alloc}, alloc);