1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Return the result of Kerberos ticket check

This commit is contained in:
Игорь Чудов 2019-11-28 16:32:56 +04:00
parent 236158d5d1
commit f8768e9334
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC

View File

@ -68,7 +68,7 @@ def machine_kinit():
'''
host = get_machine_name()
subprocess.call(['kinit', '-k', host])
logging.debug('kinit succeed')
return check_krb_ticket()
def check_krb_ticket():
'''
@ -80,8 +80,9 @@ def check_krb_ticket():
logging.info(output)
except:
logging.error('Kerberos ticket check unsuccessful')
sys.exit(1)
return False
logging.info('Ticket check succeed')
return True
def get_domain_name(lp, creds, dc):
'''