mirror of
https://github.com/postgres/postgres.git
synced 2025-11-26 23:43:30 +03:00
Post-PG 10 beta1 pgindent run
perltidy run not included.
This commit is contained in:
@@ -757,10 +757,10 @@ CheckPWChallengeAuth(Port *port, char **logdetail)
|
||||
* If the user does not exist, or has no password or it's expired, we
|
||||
* still go through the motions of authentication, to avoid revealing to
|
||||
* the client that the user didn't exist. If 'md5' is allowed, we choose
|
||||
* whether to use 'md5' or 'scram-sha-256' authentication based on
|
||||
* current password_encryption setting. The idea is that most genuine
|
||||
* users probably have a password of that type, and if we pretend that
|
||||
* this user had a password of that type, too, it "blends in" best.
|
||||
* whether to use 'md5' or 'scram-sha-256' authentication based on current
|
||||
* password_encryption setting. The idea is that most genuine users
|
||||
* probably have a password of that type, and if we pretend that this user
|
||||
* had a password of that type, too, it "blends in" best.
|
||||
*/
|
||||
if (!shadow_pass)
|
||||
pwtype = Password_encryption;
|
||||
@@ -770,8 +770,8 @@ CheckPWChallengeAuth(Port *port, char **logdetail)
|
||||
/*
|
||||
* If 'md5' authentication is allowed, decide whether to perform 'md5' or
|
||||
* 'scram-sha-256' authentication based on the type of password the user
|
||||
* has. If it's an MD5 hash, we must do MD5 authentication, and if it's
|
||||
* a SCRAM verifier, we must do SCRAM authentication.
|
||||
* has. If it's an MD5 hash, we must do MD5 authentication, and if it's a
|
||||
* SCRAM verifier, we must do SCRAM authentication.
|
||||
*
|
||||
* If MD5 authentication is not allowed, always use SCRAM. If the user
|
||||
* had an MD5 password, CheckSCRAMAuth() will fail.
|
||||
|
||||
@@ -50,7 +50,7 @@ get_role_password(const char *role, char **logdetail)
|
||||
{
|
||||
*logdetail = psprintf(_("Role \"%s\" does not exist."),
|
||||
role);
|
||||
return NULL; /* no such user */
|
||||
return NULL; /* no such user */
|
||||
}
|
||||
|
||||
datum = SysCacheGetAttr(AUTHNAME, roleTup,
|
||||
@@ -60,7 +60,7 @@ get_role_password(const char *role, char **logdetail)
|
||||
ReleaseSysCache(roleTup);
|
||||
*logdetail = psprintf(_("User \"%s\" has no password assigned."),
|
||||
role);
|
||||
return NULL; /* user has no password */
|
||||
return NULL; /* user has no password */
|
||||
}
|
||||
shadow_pass = TextDatumGetCString(datum);
|
||||
|
||||
@@ -76,7 +76,7 @@ get_role_password(const char *role, char **logdetail)
|
||||
*logdetail = psprintf(_("User \"%s\" has an empty password."),
|
||||
role);
|
||||
pfree(shadow_pass);
|
||||
return NULL; /* empty password */
|
||||
return NULL; /* empty password */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -122,8 +122,8 @@ encrypt_password(PasswordType target_type, const char *role,
|
||||
if (guessed_type != PASSWORD_TYPE_PLAINTEXT)
|
||||
{
|
||||
/*
|
||||
* Cannot convert an already-encrypted password from one
|
||||
* format to another, so return it as it is.
|
||||
* Cannot convert an already-encrypted password from one format to
|
||||
* another, so return it as it is.
|
||||
*/
|
||||
return pstrdup(password);
|
||||
}
|
||||
@@ -274,6 +274,7 @@ plain_crypt_verify(const char *role, const char *shadow_pass,
|
||||
break;
|
||||
|
||||
case PASSWORD_TYPE_PLAINTEXT:
|
||||
|
||||
/*
|
||||
* We never store passwords in plaintext, so this shouldn't
|
||||
* happen.
|
||||
|
||||
@@ -617,7 +617,10 @@ check_db(const char *dbname, const char *role, Oid roleid, List *tokens)
|
||||
tok = lfirst(cell);
|
||||
if (am_walsender && !am_db_walsender)
|
||||
{
|
||||
/* physical replication walsender connections can only match replication keyword */
|
||||
/*
|
||||
* physical replication walsender connections can only match
|
||||
* replication keyword
|
||||
*/
|
||||
if (token_is_keyword(tok, "replication"))
|
||||
return true;
|
||||
}
|
||||
@@ -1842,7 +1845,7 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline,
|
||||
int ret;
|
||||
List *parsed_servers;
|
||||
ListCell *l;
|
||||
char *dupval = pstrdup(val);
|
||||
char *dupval = pstrdup(val);
|
||||
|
||||
REQUIRE_AUTH_OPTION(uaRADIUS, "radiusservers", "radius");
|
||||
|
||||
@@ -1891,7 +1894,7 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline,
|
||||
{
|
||||
List *parsed_ports;
|
||||
ListCell *l;
|
||||
char *dupval = pstrdup(val);
|
||||
char *dupval = pstrdup(val);
|
||||
|
||||
REQUIRE_AUTH_OPTION(uaRADIUS, "radiusports", "radius");
|
||||
|
||||
@@ -1926,7 +1929,7 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline,
|
||||
else if (strcmp(name, "radiussecrets") == 0)
|
||||
{
|
||||
List *parsed_secrets;
|
||||
char *dupval = pstrdup(val);
|
||||
char *dupval = pstrdup(val);
|
||||
|
||||
REQUIRE_AUTH_OPTION(uaRADIUS, "radiussecrets", "radius");
|
||||
|
||||
@@ -1948,7 +1951,7 @@ parse_hba_auth_opt(char *name, char *val, HbaLine *hbaline,
|
||||
else if (strcmp(name, "radiusidentifiers") == 0)
|
||||
{
|
||||
List *parsed_identifiers;
|
||||
char *dupval = pstrdup(val);
|
||||
char *dupval = pstrdup(val);
|
||||
|
||||
REQUIRE_AUTH_OPTION(uaRADIUS, "radiusidentifiers", "radius");
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
#ifdef HAVE_UTIME_H
|
||||
#include <utime.h>
|
||||
#endif
|
||||
#ifdef _MSC_VER /* mstcpip.h is missing on mingw */
|
||||
#ifdef _MSC_VER /* mstcpip.h is missing on mingw */
|
||||
#include <mstcpip.h>
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user