| |
@@ -27,6 +27,8 @@
|
| |
|
| |
# These are mapped from the infosssd configuration in sssd.conf
|
| |
sssd_mapping = [
|
| |
+ ['username', 'nickname'],
|
| |
+ ['username', 'preferred_username'],
|
| |
['gecos', 'fullname'],
|
| |
['mail', 'email'],
|
| |
['givenname', 'givenname'],
|
| |
@@ -84,7 +86,11 @@
|
| |
user_obj = self.bus.get_object('org.freedesktop.sssd.infopipe',
|
| |
user_path)
|
| |
|
| |
- # Get GECOS, attributes, and groups
|
| |
+ # Get username, GECOS, attributes, and groups
|
| |
+ reply['username'] = self._unwrap_dbus_str(user_obj.Get(
|
| |
+ 'org.freedesktop.sssd.infopipe.Users.User',
|
| |
+ 'name',
|
| |
+ dbus_interface=dbus.PROPERTIES_IFACE))
|
| |
reply['gecos'] = self._unwrap_dbus_str(user_obj.Get(
|
| |
'org.freedesktop.sssd.infopipe.Users.User',
|
| |
'gecos',
|
| |
With SSSd, it is possible to login with one's email address. In this case, the username needs to be mapped to
nickname
, but it was not requested from DBus. As a result, the logged in user had their email address as username. This commit adds the query and the corresponding mapping.