1) Fixed an issue where the user is not warned if Kerberos ticket expiration

is less than 30 min while initiating a global backup. Fixes #6444

2) Ensure that proper identification should be there when the server is
   connected using Kerberos or without Kerberos. Fixes #6445
This commit is contained in:
Khushboo Vashi
2021-05-14 12:33:01 +05:30
committed by Akshay Joshi
parent 7ed97eeec4
commit 7275ce906e
6 changed files with 47 additions and 3 deletions

View File

@@ -562,6 +562,26 @@ WHERE db.datname = current_database()""")
if len(manager.db_info) == 1:
manager.did = res['did']
if manager.sversion >= 120000:
status = self._execute(cur, """
SELECT
gss_authenticated, encrypted
FROM
pg_catalog.pg_stat_gssapi
WHERE pid = pg_backend_pid()""")
if status is None:
if cur.rowcount > 0:
res_enc = cur.fetchmany(1)[0]
manager.db_info[res['did']]['gss_authenticated'] =\
res_enc['gss_authenticated']
manager.db_info[res['did']]['gss_encrypted'] = \
res_enc['encrypted']
if len(manager.db_info) == 1:
manager.gss_authenticated = \
res_enc['gss_authenticated']
manager.gss_encrypted = res_enc['encrypted']
self._set_user_info(cur, manager, **kwargs)
self._set_server_type_and_password(kwargs, manager)

View File

@@ -106,6 +106,9 @@ class ServerManager(object):
self.tunnel_password = None
self.kerberos_conn = server.kerberos_conn
self.gss_authenticated = False
self.gss_encrypted = False
for con in self.connections:
self.connections[con]._release()