squash the following commits

LDAP: Adding support for extra properties
Implement GetUserInfo function in phosphor-user-manager

Squashing the commits due to phosphor-dbus-interfaces
dependency as the interface gets merged and it requires implementation
so it is a deadlock for both the commits.

Implement GetUserInfo function in phosphor-user-manager

There was need to have api which return privilege for ldap user.
it was discussed in this commit
https://gerrit.openbmc-project.xyz/#/c/openbmc/phosphor-dbus-interfaces/+/12027/
and decided to have generic api.

-Checks if user is local user, then returns map of properties of
 local user like user privilege,list of user groups,user enabled
 state and user locked state.

-If its not local user, then it checks if its a ldap user,
 then get the privilege mapping for the LDAP group and returns.

TestedBy: 1) getUserInfo with local user
             verify user details.
          2) getUserInfo with ldap user having privilege mapper
             entry, verify user details.
          3) getUserInfo with no existing user.
              check for exception UserNameDoesNotExist.

Change-Id: I44af41953db60ff96b39498d72839c2ab64bc8bd
Signed-off-by: raviteja-b <raviteja28031990@gmail.com>

LDAP: Adding support for extra properties

This commit also decouple the ldap service(nslcd) start
with each property update,Now there is a D-bus property
ldap service enabled which controls that whether the LDAP
service will be restarted after each property update,so now user
have an option to disable the ldap service and do multi-
property update and then enable the service again.

TestedBy: 1) Create the config with new added properties
               Verify that it was getting reflected on the D-bus object.
          2) After making the change restarted the ldap-conf service
               Verify that new properties(usernameattr,groupnameattr) are correctly updated.
          3) Authenticaton test
               Verify that LDAP authentication worked fine.
          4) Set the enabled property to true
               Verify that it starts the nslcd service
          5) Set the enabled property to false
               Verify that it stops the nslcd.service
          6) Set the enabled property to true and change any other config property
               Verify that it starts the nslcd.service
          7) Set the enabled property to false which stops the nslcd service
                 and change any other config property.
               Verify that it doesn't start the nslcd service.

Change-Id: Ie3ca04a2adbbb1fe113764199348c4f7ac67f648
Signed-off-by: Ratan Gupta <ratagupt@linux.vnet.ibm.com>
5 files changed