diff options
author | Rob Crittenden <rcritten@redhat.com> | 2008-10-22 17:54:04 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-10-22 17:54:04 -0400 |
commit | 1daf319a19f902d7c7bef37af065cac81be9189e (patch) | |
tree | 5d840adb9273b7fa0569477fdf2be68d351d0d69 /ipalib/plugins/f_passwd.py | |
parent | f189b02996668e5d600f1abed675cb20cd72290f (diff) | |
download | freeipa-1daf319a19f902d7c7bef37af065cac81be9189e.tar.gz freeipa-1daf319a19f902d7c7bef37af065cac81be9189e.tar.xz freeipa-1daf319a19f902d7c7bef37af065cac81be9189e.zip |
Implement the host commands
In order for this to work against a v1 database the update host.update needs to
be applied
Diffstat (limited to 'ipalib/plugins/f_passwd.py')
-rw-r--r-- | ipalib/plugins/f_passwd.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/ipalib/plugins/f_passwd.py b/ipalib/plugins/f_passwd.py index b1f907322..f70eacac8 100644 --- a/ipalib/plugins/f_passwd.py +++ b/ipalib/plugins/f_passwd.py @@ -26,15 +26,7 @@ from ipalib.frontend import Param from ipalib import api from ipalib import errors from ipalib import ipa_types -import krbV - -def get_current_principal(): - try: - return krbV.default_context().default_ccache().principal().name - except krbV.Krb5Error: - #TODO: do a kinit - print "Unable to get kerberos principal" - return None +from ipalib import util class passwd(frontend.Command): 'Edit existing password policy.' @@ -42,7 +34,7 @@ class passwd(frontend.Command): Param('principal', cli_name='user', primary_key=True, - default_from=get_current_principal, + default_from=util.get_current_principal, ), ) def execute(self, principal, **kw): |