blob: b54e2cb6a72004495d360386ceb2973f97d14851 [file] [log] [blame]
Vishwanatha Subbannad20225f2017-09-06 11:36:04 +05301#include "config.h"
2
Patrick Williams9638afb2021-02-22 17:16:24 -06003#include "user_mgr.hpp"
4
Nan Zhouc5382db2022-09-19 23:08:08 +00005#include <sdbusplus/bus.hpp>
6#include <sdbusplus/server/manager.hpp>
Patrick Williams9638afb2021-02-22 17:16:24 -06007
Vishwanatha Subbannad20225f2017-09-06 11:36:04 +05308// D-Bus root for user manager
Nan Zhou78d85042022-08-29 17:50:22 +00009constexpr auto userManagerRoot = "/xyz/openbmc_project/user";
Vishwanatha Subbanna8a89b532017-09-06 11:29:37 +053010
Ratan Gupta0b1ad3d2022-01-09 14:09:35 +053011int main(int /*argc*/, char** /*argv*/)
Vishwanatha Subbanna8a89b532017-09-06 11:29:37 +053012{
Vishwanatha Subbannad20225f2017-09-06 11:36:04 +053013 auto bus = sdbusplus::bus::new_default();
Nan Zhou78d85042022-08-29 17:50:22 +000014 sdbusplus::server::manager_t objManager(bus, userManagerRoot);
Richard Marian Thomaiyar9f630d92018-05-24 10:49:10 +053015
Nan Zhou78d85042022-08-29 17:50:22 +000016 phosphor::user::UserMgr userMgr(bus, userManagerRoot);
Vishwanatha Subbannad20225f2017-09-06 11:36:04 +053017
18 // Claim the bus now
19 bus.request_name(USER_MANAGER_BUSNAME);
20
21 // Wait for client request
Nan Zhouc5382db2022-09-19 23:08:08 +000022 bus.process_loop();
Vishwanatha Subbanna8a89b532017-09-06 11:29:37 +053023}