mirror of
https://github.com/os-mnemo/pan-globalprotect-okta
synced 2026-07-31 07:44:38 +02:00
Fix temporary certificate file removal, mentioned in #21.
This commit is contained in:
+7
-2
@@ -940,8 +940,6 @@ def main():
|
|||||||
if conf.certs:
|
if conf.certs:
|
||||||
cmd += ' --cafile=\'{0}\''.format(conf.certs)
|
cmd += ' --cafile=\'{0}\''.format(conf.certs)
|
||||||
cmd += ' --passwd-on-stdin ' + conf.openconnect_args + ' \'{2}\''
|
cmd += ' --passwd-on-stdin ' + conf.openconnect_args + ' \'{2}\''
|
||||||
if conf.certs:
|
|
||||||
cmd += '; rm -f \'{0}\''.format(conf.certs)
|
|
||||||
cmd = cmd.format(username, cookie_type,
|
cmd = cmd.format(username, cookie_type,
|
||||||
gateway_url if conf.get_bool('another_dance') else conf.vpn_url)
|
gateway_url if conf.get_bool('another_dance') else conf.vpn_url)
|
||||||
|
|
||||||
@@ -982,7 +980,14 @@ def main():
|
|||||||
# Do not abort on SIGINT. openconnect will perform proper exit & cleanup
|
# Do not abort on SIGINT. openconnect will perform proper exit & cleanup
|
||||||
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||||
cp.communicate()
|
cp.communicate()
|
||||||
|
if conf.certs:
|
||||||
|
try:
|
||||||
|
os.unlink(conf.certs)
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
|
if conf.certs:
|
||||||
|
cmd += '; rm -f \'{0}\''.format(conf.certs)
|
||||||
print('{0} | {1}'.format(pcmd, cmd))
|
print('{0} | {1}'.format(pcmd, cmd))
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user