From 771b8fd095f3bcb922f761d297c62f1a56a997d5 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 16 Feb 2015 14:04:49 -0500 Subject: Prefix userdata hives with _ to avoid conflicts The main userdata dict contains common attributes, but we add a sepcial groups list and unmapped extras, as well as indicators like auth_type. All these additional attributes are now prefixed by a _ character so that conflicts with legitimate attributes are improbable. Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- ipsilon/info/infoldap.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipsilon/info/infoldap.py') diff --git a/ipsilon/info/infoldap.py b/ipsilon/info/infoldap.py index efdb649..0ec6dd1 100644 --- a/ipsilon/info/infoldap.py +++ b/ipsilon/info/infoldap.py @@ -129,9 +129,9 @@ Info plugin that uses LDAP to retrieve user data. """ ldapattrs = self._get_user_data(conn, dn) userattrs, extras = self.mapper.map_attrs(ldapattrs) groups = self._get_user_groups(conn, dn, ldapattrs) - reply['userdata'] = userattrs - reply['groups'] = groups - reply['extras'] = {'ldap': extras} + reply = userattrs + reply['_groups'] = groups + reply['_extras'] = {'ldap': extras} except Exception, e: # pylint: disable=broad-except self.error(e) -- cgit