diff options
author | Ed Tanous <ed@tanous.net> | 2024-03-19 22:18:06 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-03-25 21:29:19 +0300 |
commit | 47f2934cc509e420e5617a96158e76829746b835 (patch) | |
tree | dd73fdb8eb071886f4de28a0a911972d6ce4940f /include | |
parent | 0501696e3663eafb3e497120b85f0f0a8194a97b (diff) | |
download | bmcweb-47f2934cc509e420e5617a96158e76829746b835.tar.xz |
Fix redundant init issues
clang-tidy-18 must've fixed their checking for these in headers.
Resolve as the robot commands.
Tested: Noop changes made by tidy. Code compiles.
Change-Id: I1de7686c597deffb0df91c30dae1a29f9ba7900e
Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/sessions.hpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/include/sessions.hpp b/include/sessions.hpp index cb7f78e78a..fb7276212c 100644 --- a/include/sessions.hpp +++ b/include/sessions.hpp @@ -41,8 +41,8 @@ struct UserSession PersistenceType persistence{PersistenceType::TIMEOUT}; bool cookieAuth = false; bool isConfigureSelfOnly = false; - std::string userRole{}; - std::vector<std::string> userGroups{}; + std::string userRole; + std::vector<std::string> userGroups; // There are two sources of truth for isConfigureSelfOnly: // 1. When pamAuthenticateUser() returns PAM_NEW_AUTHTOK_REQD. @@ -256,11 +256,19 @@ class SessionStore } } - auto session = std::make_shared<UserSession>(UserSession{ - uniqueId, sessionToken, std::string(username), csrfToken, clientId, - redfish::ip_util::toString(clientIp), - std::chrono::steady_clock::now(), persistence, false, - isConfigureSelfOnly}); + auto session = std::make_shared<UserSession>( + UserSession{uniqueId, + sessionToken, + std::string(username), + csrfToken, + clientId, + redfish::ip_util::toString(clientIp), + std::chrono::steady_clock::now(), + persistence, + false, + isConfigureSelfOnly, + "", + {}}); auto it = authTokens.emplace(sessionToken, session); // Only need to write to disk if session isn't about to be destroyed. needWrite = persistence == PersistenceType::TIMEOUT; |