mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Adopted kinit_keytab and kinit_password for kerberos auth
Calls to ipautil.run using kinit were replaced with calls kinit_keytab/kinit_password functions implemented in the PATCH 0015. Reviewed-By: Jan Cholasta <jcholast@redhat.com> Reviewed-By: Simo Sorce <ssorce@redhat.com> Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
committed by
Jan Cholasta
parent
a8e30e9671
commit
3d2feac0e4
@@ -21,6 +21,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import sys
|
||||
import os
|
||||
import syslog
|
||||
import tempfile
|
||||
import shutil
|
||||
@@ -42,8 +43,10 @@ def _main():
|
||||
tmpdir = tempfile.mkdtemp(prefix="tmp-")
|
||||
try:
|
||||
principal = str('host/%s@%s' % (api.env.host, api.env.realm))
|
||||
ccache = ipautil.kinit_hostprincipal(paths.KRB5_KEYTAB, tmpdir,
|
||||
principal)
|
||||
ccache_filename = os.path.join(tmpdir, 'ccache')
|
||||
ipautil.kinit_keytab(principal, paths.KRB5_KEYTAB,
|
||||
ccache_filename)
|
||||
os.environ['KRB5CCNAME'] = ccache_filename
|
||||
|
||||
ca = cainstance.CAInstance(host_name=api.env.host, ldapi=False)
|
||||
if ca.is_renewal_master():
|
||||
|
||||
Reference in New Issue
Block a user