diff options
author | Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> | 2018-05-24 10:49:10 +0530 |
---|---|---|
committer | Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> | 2018-09-03 14:16:20 +0530 |
commit | 9f630d9eb0ce1c103532a4304ea080066199094e (patch) | |
tree | b102a63e2617d928ce82215b07637336ded2db7d /mainapp.cpp | |
parent | 10eb23f8d64d197dade920178b193c1979235156 (diff) | |
download | phosphor-user-manager-9f630d9eb0ce1c103532a4304ea080066199094e.tar.gz phosphor-user-manager-9f630d9eb0ce1c103532a4304ea080066199094e.zip |
Basic support for User manager service
Basic support for User Manager service methods
are implemented.
Change-Id: Id42432ec6dd421b99971268add931dcd70876f7c
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Diffstat (limited to 'mainapp.cpp')
-rw-r--r-- | mainapp.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/mainapp.cpp b/mainapp.cpp index 04c7825..c9da030 100644 --- a/mainapp.cpp +++ b/mainapp.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ #include <string> -#include "user.hpp" +#include "user_mgr.hpp" #include "config.h" // D-Bus root for user manager @@ -23,22 +23,15 @@ constexpr auto USER_MANAGER_ROOT = "/xyz/openbmc_project/user"; int main(int argc, char** argv) { auto bus = sdbusplus::bus::new_default(); - - // This is hard coded "root" user. - // TODO: This would need to be changed when the complete - // user management code is written. May be, have manager - // create these user objects. - // Issue: openbmc/openbmc#2299 - auto objPath = std::string{USER_MANAGER_ROOT} + '/' + "root"; - sdbusplus::server::manager::manager objManager(bus, USER_MANAGER_ROOT); - phosphor::user::User user(bus, objPath.c_str()); + + phosphor::user::UserMgr userMgr(bus, USER_MANAGER_ROOT); // Claim the bus now bus.request_name(USER_MANAGER_BUSNAME); // Wait for client request - while(true) + while (true) { // process dbus calls / signals discarding unhandled bus.process_discard(); |