diff options
Diffstat (limited to 'ipalib/plugins')
-rw-r--r-- | ipalib/plugins/kerberos.py | 9 | ||||
-rw-r--r-- | ipalib/plugins/misc.py | 5 | ||||
-rw-r--r-- | ipalib/plugins/user.py | 9 |
3 files changed, 9 insertions, 14 deletions
diff --git a/ipalib/plugins/kerberos.py b/ipalib/plugins/kerberos.py index 5c048719d..babedd814 100644 --- a/ipalib/plugins/kerberos.py +++ b/ipalib/plugins/kerberos.py @@ -28,12 +28,7 @@ from ipalib import api from ipalib.backend import Backend import krbV - -# FIXME: Is it safe to assume the Kerberos library is using UTF-8 for the -# principal and realm? If not, how do we query the Kerberos library to find -# the encoding it's using? ENCODING = 'UTF-8' -FS_ENCODING = (sys.getfilesystemencoding() or sys.getdefaultencoding()) class krb(Backend): @@ -61,7 +56,7 @@ class krb(Backend): """ Return the ``krbV.CCache`` for the ``ccname`` credential ccache. """ - return krbV.CCache(ccname.encode(FS_ENCODING)) + return krbV.CCache(ccname) def __get_principal(self, ccname): """ @@ -78,7 +73,7 @@ class krb(Backend): This cannot return anything meaningful if used in the server as a request is processed. """ - return self.__default_ccache().name.decode(FS_ENCODING) + return self.__default_ccache().name def default_principal(self): """ diff --git a/ipalib/plugins/misc.py b/ipalib/plugins/misc.py index 2dcc6554c..8bf9d81fd 100644 --- a/ipalib/plugins/misc.py +++ b/ipalib/plugins/misc.py @@ -45,20 +45,21 @@ class env(LocalOrRemote): keys.add(key) elif query in self.env: keys.add(query) - return sorted(keys) + return keys def execute(self, variables, **options): if variables is None: keys = self.env else: keys = self.__find_keys(variables) - return tuple( + return dict( (key, self.env[key]) for key in keys ) def output_for_cli(self, textui, result, variables, **options): if len(result) == 0: return + result = tuple((k, result[k]) for k in sorted(result)) if len(result) == 1: textui.print_keyval(result) return diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index 256ff9ca7..643531305 100644 --- a/ipalib/plugins/user.py +++ b/ipalib/plugins/user.py @@ -70,15 +70,15 @@ class user(LDAPObject): takes_params = ( Str('givenname', cli_name='first', - doc='first name', + doc='First name', ), Str('sn', cli_name='last', - doc='last name', + doc='Last name', ), Str('uid', cli_name='user', - doc='login name', + doc='Login name', primary_key=True, default_from=lambda givenname, sn: givenname[0] + sn, normalizer=lambda value: value.lower(), @@ -90,7 +90,7 @@ class user(LDAPObject): ), Str('homedirectory?', cli_name='homedir', - doc='home directory', + doc='Home directory', default_from=lambda uid: '/home/%s' % uid, ), Str('loginshell?', @@ -251,4 +251,3 @@ class user_unlock(LDAPQuery): textui.print_dashed('Unlocked user "%s".' % keys[-1]) api.register(user_unlock) - |