mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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:
committed by
Akshay Joshi
parent
7ed97eeec4
commit
7275ce906e
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user