From: Timo Sirainen Date: Thu, 11 Jan 2024 16:13:35 +0000 (-0500) Subject: auth: Rename struct auth.set to protocol_set X-Git-Tag: 2.4.1~1112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12377d9b05a7f437da37aa3f4ea362183d075687;p=thirdparty%2Fdovecot%2Fcore.git auth: Rename struct auth.set to protocol_set This makes it easier to grep where it's actually being used in the code, since it's ideally used in as few places as possible. --- diff --git a/src/auth/auth-client-connection.c b/src/auth/auth-client-connection.c index 0abec0931e..05d4819d87 100644 --- a/src/auth/auth-client-connection.c +++ b/src/auth/auth-client-connection.c @@ -67,7 +67,7 @@ static void auth_client_send(struct auth_client_connection *conn, o_stream_nsendv(conn->conn.output, iov, N_ELEMENTS(iov)); e_debug(conn->conn.event, "client passdb out: %s", - conn->auth->set->debug_passwords ? + conn->auth->protocol_set->debug_passwords ? cmd : reply_line_hide_pass(cmd)); } @@ -140,7 +140,7 @@ auth_line_hide_pass(struct auth_client_connection *conn, const char *const *args if (arg != args) str_append_c(newline, '\t'); if (str_begins_with(*arg, "resp=")) { - if (conn->auth->set->debug_passwords) { + if (conn->auth->protocol_set->debug_passwords) { str_append_tabescaped(newline, *arg); str_append(newline, AUTH_DEBUG_SENSITIVE_SUFFIX); break; @@ -161,7 +161,7 @@ cont_line_hide_pass(struct auth_client_connection *conn, const char *const *args if (args[1] == NULL) return args[0]; - if (conn->auth->set->debug_passwords) { + if (conn->auth->protocol_set->debug_passwords) { return t_strconcat(t_strarray_join(args, "\t"), AUTH_DEBUG_SENSITIVE_SUFFIX, NULL); } diff --git a/src/auth/auth-master-connection.c b/src/auth/auth-master-connection.c index 9fe9188120..9f262ada72 100644 --- a/src/auth/auth-master-connection.c +++ b/src/auth/auth-master-connection.c @@ -49,7 +49,7 @@ auth_master_reply_hide_passwords(struct auth_master_connection *conn, char **args, *p, *p2; unsigned int i; - if (conn->auth->set->debug_passwords) + if (conn->auth->protocol_set->debug_passwords) return str; /* hide all parameters that have "pass" in their key */ diff --git a/src/auth/auth-request.c b/src/auth/auth-request.c index f03b93e19e..6e7cb1910e 100644 --- a/src/auth/auth-request.c +++ b/src/auth/auth-request.c @@ -207,7 +207,7 @@ void auth_request_init(struct auth_request *request) struct auth *auth; auth = auth_request_get_auth(request); - request->set = auth->set; + request->set = auth->protocol_set; request->passdb = auth->passdbs; request->userdb = auth->userdbs; } diff --git a/src/auth/auth.c b/src/auth/auth.c index 275d790925..4422600ce3 100644 --- a/src/auth/auth.c +++ b/src/auth/auth.c @@ -260,7 +260,7 @@ auth_preinit(const struct auth_settings *set, const char *protocol, auth = p_new(pool, struct auth, 1); auth->pool = pool; auth->protocol = p_strdup(pool, protocol); - auth->set = set; + auth->protocol_set = set; pool_ref(set->pool); auth->reg = reg; @@ -471,7 +471,7 @@ void auths_free(void) struct auth *auth; array_foreach_elem(&auths, auth) { - settings_free(auth->set); + settings_free(auth->protocol_set); pool_unref(&auth->pool); } array_free(&auths); diff --git a/src/auth/auth.h b/src/auth/auth.h index 963ee6ec04..7c8256dedf 100644 --- a/src/auth/auth.h +++ b/src/auth/auth.h @@ -73,7 +73,7 @@ struct auth_userdb { struct auth { pool_t pool; const char *protocol; - const struct auth_settings *set; + const struct auth_settings *protocol_set; const struct mechanisms_register *reg; struct auth_passdb *masterdbs;