Loading src/session.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -436,9 +436,19 @@ const authdb::SessionData *authdb::ClusterSession::addSession(AuthBackend &backe std::vector<std::pair<uuid::uuid, bool>> cluster_gpo; if (g_Cluster->fetchSession(userid, domainid, cluster_sid, cluster_members, cluster_username, cluster_gpo)) { std::cerr << "[SESSION] addSession: found existing session sid=" << cluster_sid.c_str() << " via uid+did lookup, ensuring sid_gid entry exists" << std::endl; SessionData *imported = new SessionData(cluster_sid, userid, domainid, cluster_members); imported->_username = cluster_username; imported->setGPOResults(cluster_gpo); // Ensure sid_gid entry exists — it may have been lost try { g_Cluster->pushSession(*imported); } catch (const std::exception &e) { std::cerr << "[SESSION] addSession: re-push of existing session FAILED: " << e.what() << std::endl; } std::lock_guard<std::mutex> guard(_lock); removeLocal(cluster_sid); appendLocal(imported); Loading Loading
src/session.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -436,9 +436,19 @@ const authdb::SessionData *authdb::ClusterSession::addSession(AuthBackend &backe std::vector<std::pair<uuid::uuid, bool>> cluster_gpo; if (g_Cluster->fetchSession(userid, domainid, cluster_sid, cluster_members, cluster_username, cluster_gpo)) { std::cerr << "[SESSION] addSession: found existing session sid=" << cluster_sid.c_str() << " via uid+did lookup, ensuring sid_gid entry exists" << std::endl; SessionData *imported = new SessionData(cluster_sid, userid, domainid, cluster_members); imported->_username = cluster_username; imported->setGPOResults(cluster_gpo); // Ensure sid_gid entry exists — it may have been lost try { g_Cluster->pushSession(*imported); } catch (const std::exception &e) { std::cerr << "[SESSION] addSession: re-push of existing session FAILED: " << e.what() << std::endl; } std::lock_guard<std::mutex> guard(_lock); removeLocal(cluster_sid); appendLocal(imported); Loading