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:
parent
236158d5d1
commit
f8768e9334
@ -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):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user