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/nss.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ipsilon/info/nss.py') diff --git a/ipsilon/info/nss.py b/ipsilon/info/nss.py index 1107387..2f4039a 100644 --- a/ipsilon/info/nss.py +++ b/ipsilon/info/nss.py @@ -61,9 +61,9 @@ class InfoProvider(InfoProviderBase): userattrs, extras = self.mapper.map_attrs(posix_user) groups = self._get_posix_groups(posix_user['username'], posix_user['gidNumber']) - reply['userdata'] = userattrs - reply['groups'] = groups - reply['extras'] = {'posix': extras} + reply = userattrs + reply['_groups'] = groups + reply['_extras'] = {'posix': extras} except KeyError: pass -- cgit