From 1daf319a19f902d7c7bef37af065cac81be9189e Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 22 Oct 2008 17:54:04 -0400 Subject: Implement the host commands In order for this to work against a v1 database the update host.update needs to be applied --- ipalib/plugins/f_passwd.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'ipalib/plugins/f_passwd.py') diff --git a/ipalib/plugins/f_passwd.py b/ipalib/plugins/f_passwd.py index b1f90732..f70eacac 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): -- cgit