Skip to content

Commit eac5279

Browse files
authored
Squash all DBRX changes on top of b810fdf. (#673) (#684)
Keep "neon" prefix and visibility. Also remove idea .gitignore lines, that's a personal developer environment preference rather than a git repository setup. Also remove Databricks restrictions.
1 parent 8de764e commit eac5279

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5508,7 +5508,8 @@ readNeonSignalFile(void)
55085508
close(fd);
55095509

55105510
elog(LOG,
5511-
"[NEON] found 'neon.signal' file. setting prev LSN to %X/%X",
5511+
"[NEON] found '%s' file. setting prev LSN to %X/%X",
5512+
NEON_SIGNAL_FILE,
55125513
LSN_FORMAT_ARGS(neonLastRec));
55135514
}
55145515
}

src/backend/libpq/auth.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@ static int PerformRadiusTransaction(const char *server, const char *secret, cons
229229
*/
230230
ClientAuthentication_hook_type ClientAuthentication_hook = NULL;
231231

232+
/*
233+
* This hook calls back Databricks CP for authentication
234+
*/
235+
DatabricksAuthentication_hook_type DatabricksAuthentication_hook = NULL;
236+
232237
/*
233238
* Tell the user the authentication failed, but not (much about) why.
234239
*
@@ -805,6 +810,15 @@ CheckPasswordAuth(Port *port, const char **logdetail)
805810
else
806811
result = STATUS_ERROR;
807812

813+
if (result != STATUS_OK && DatabricksAuthentication_hook)
814+
{
815+
elog(LOG, "Calling DatabricksAuthentication_hook");
816+
817+
result = (*DatabricksAuthentication_hook)(port, passwd);
818+
819+
elog(LOG, "DatabricksAuthentication_hook returned: %d", result);
820+
}
821+
808822
if (shadow_pass)
809823
pfree(shadow_pass);
810824
pfree(passwd);

src/include/libpq/auth.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ typedef char *(*auth_password_hook_typ) (char *input);
3434
/* Default LDAP password mutator hook, can be overridden by a shared library */
3535
extern PGDLLIMPORT auth_password_hook_typ ldap_password_hook;
3636

37+
/* Hook for databricks authentication */
38+
typedef int (*DatabricksAuthentication_hook_type) (Port *, char *);
39+
extern PGDLLIMPORT DatabricksAuthentication_hook_type DatabricksAuthentication_hook;
40+
3741
#endif /* AUTH_H */

0 commit comments

Comments
 (0)