Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/backend/access/transam/xlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -5508,7 +5508,8 @@ readNeonSignalFile(void)
close(fd);

elog(LOG,
"[NEON] found 'neon.signal' file. setting prev LSN to %X/%X",
"[NEON] found '%s' file. setting prev LSN to %X/%X",
NEON_SIGNAL_FILE,
LSN_FORMAT_ARGS(neonLastRec));
}
}
Expand Down
14 changes: 14 additions & 0 deletions src/backend/libpq/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ static int PerformRadiusTransaction(const char *server, const char *secret, cons
*/
ClientAuthentication_hook_type ClientAuthentication_hook = NULL;

/*
* This hook calls back Databricks CP for authentication
*/
DatabricksAuthentication_hook_type DatabricksAuthentication_hook = NULL;

/*
* Tell the user the authentication failed, but not (much about) why.
*
Expand Down Expand Up @@ -805,6 +810,15 @@ CheckPasswordAuth(Port *port, const char **logdetail)
else
result = STATUS_ERROR;

if (result != STATUS_OK && DatabricksAuthentication_hook)
{
elog(LOG, "Calling DatabricksAuthentication_hook");

result = (*DatabricksAuthentication_hook)(port, passwd);

elog(LOG, "DatabricksAuthentication_hook returned: %d", result);
}

if (shadow_pass)
pfree(shadow_pass);
pfree(passwd);
Expand Down
4 changes: 4 additions & 0 deletions src/include/libpq/auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ typedef char *(*auth_password_hook_typ) (char *input);
/* Default LDAP password mutator hook, can be overridden by a shared library */
extern PGDLLIMPORT auth_password_hook_typ ldap_password_hook;

/* Hook for databricks authentication */
typedef int (*DatabricksAuthentication_hook_type) (Port *, char *);
extern PGDLLIMPORT DatabricksAuthentication_hook_type DatabricksAuthentication_hook;

#endif /* AUTH_H */