summaryrefslogtreecommitdiffstats
path: root/phosphor-ldap-mapper/main.cpp
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2018-09-14 10:02:20 +0530
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-10-04 14:27:10 -0400
commit536ea32ddc61bc3f5ad34eada5788797e1771832 (patch)
tree184aa6f39ef50147245bed65254d614403998673 /phosphor-ldap-mapper/main.cpp
parent3618f443ceae49bbcbfd7d35563c23f876ca5d79 (diff)
downloadphosphor-user-manager-536ea32ddc61bc3f5ad34eada5788797e1771832.zip
phosphor-user-manager-536ea32ddc61bc3f5ad34eada5788797e1771832.tar.gz
ldap: Add application to configure privilege for LDAP groups
The application implements the xyz.openbmc_project.User.PrivilegeMapper D-Bus interface to configure privilege levels for LDAP groups. The Create method is used to create privilege mapping for the LDAP group. D-Bus object is created for each LDAP group and implements the D-Bus interface xyz.openbmc_project.User.PrivilegeMapperEntry. : Change-Id: I20935229a8a79ce1e52a857672a6a0085cb5ace4 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
Diffstat (limited to 'phosphor-ldap-mapper/main.cpp')
-rw-r--r--phosphor-ldap-mapper/main.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/phosphor-ldap-mapper/main.cpp b/phosphor-ldap-mapper/main.cpp
new file mode 100644
index 0000000..b4a0650
--- /dev/null
+++ b/phosphor-ldap-mapper/main.cpp
@@ -0,0 +1,25 @@
+#include <string>
+#include <experimental/filesystem>
+#include "config.h"
+#include "ldap_mapper_mgr.hpp"
+
+int main(int argc, char** argv)
+{
+ auto bus = sdbusplus::bus::new_default();
+ sdbusplus::server::manager::manager objManager(
+ bus, phosphor::user::mapperMgrRoot);
+
+ phosphor::user::LDAPMapperMgr mapperMgr(bus, phosphor::user::mapperMgrRoot);
+
+ // Claim the bus name for the application
+ bus.request_name(LDAP_MAPPER_MANAGER_BUSNAME);
+
+ // Wait for client request
+ while (true)
+ {
+ // Process D-Bus calls
+ bus.process_discard();
+ bus.wait();
+ }
+ return 0;
+}
OpenPOWER on IntegriCloud