1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Initial pgindent and pgperltidy run for v13.

Includes some manual cleanup of places that pgindent messed up,
most of which weren't per project style anyway.

Notably, it seems some people didn't absorb the style rules of
commit c9d297751, because there were a bunch of new occurrences
of function calls with a newline just after the left paren, all
with faulty expectations about how the rest of the call would get
indented.
This commit is contained in:
Tom Lane
2020-05-14 13:06:38 -04:00
parent 1255466f83
commit 5cbfce562f
198 changed files with 2019 additions and 1786 deletions

View File

@@ -162,7 +162,7 @@ static char *build_server_final_message(scram_state *state);
static bool verify_client_proof(scram_state *state);
static bool verify_final_nonce(scram_state *state);
static void mock_scram_secret(const char *username, int *iterations,
char **salt, uint8 *stored_key, uint8 *server_key);
char **salt, uint8 *stored_key, uint8 *server_key);
static bool is_scram_printable(char *p);
static char *sanitize_char(char c);
static char *sanitize_str(const char *s);
@@ -257,7 +257,7 @@ pg_be_scram_init(Port *port,
if (password_type == PASSWORD_TYPE_SCRAM_SHA_256)
{
if (parse_scram_secret(shadow_pass, &state->iterations, &state->salt,
state->StoredKey, state->ServerKey))
state->StoredKey, state->ServerKey))
got_secret = true;
else
{
@@ -293,15 +293,15 @@ pg_be_scram_init(Port *port,
}
/*
* If the user did not have a valid SCRAM secret, we still go through
* the motions with a mock one, and fail as if the client supplied an
* If the user did not have a valid SCRAM secret, we still go through the
* motions with a mock one, and fail as if the client supplied an
* incorrect password. This is to avoid revealing information to an
* attacker.
*/
if (!got_secret)
{
mock_scram_secret(state->port->user_name, &state->iterations,
&state->salt, state->StoredKey, state->ServerKey);
&state->salt, state->StoredKey, state->ServerKey);
state->doomed = true;
}
@@ -471,7 +471,7 @@ pg_be_scram_build_secret(const char *password)
errmsg("could not generate random salt")));
result = scram_build_secret(saltbuf, SCRAM_DEFAULT_SALT_LEN,
SCRAM_DEFAULT_ITERATIONS, password);
SCRAM_DEFAULT_ITERATIONS, password);
if (prep_password)
pfree(prep_password);
@@ -500,7 +500,7 @@ scram_verify_plain_password(const char *username, const char *password,
pg_saslprep_rc rc;
if (!parse_scram_secret(secret, &iterations, &encoded_salt,
stored_key, server_key))
stored_key, server_key))
{
/*
* The password looked like a SCRAM secret, but could not be parsed.
@@ -554,7 +554,7 @@ scram_verify_plain_password(const char *username, const char *password,
*/
bool
parse_scram_secret(const char *secret, int *iterations, char **salt,
uint8 *stored_key, uint8 *server_key)
uint8 *stored_key, uint8 *server_key)
{
char *v;
char *p;
@@ -645,7 +645,7 @@ invalid_secret:
*/
static void
mock_scram_secret(const char *username, int *iterations, char **salt,
uint8 *stored_key, uint8 *server_key)
uint8 *stored_key, uint8 *server_key)
{
char *raw_salt;
char *encoded_salt;