]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: Rename struct auth.set to protocol_set
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 11 Jan 2024 16:13:35 +0000 (11:13 -0500)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:11 +0000 (12:34 +0200)
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.

src/auth/auth-client-connection.c
src/auth/auth-master-connection.c
src/auth/auth-request.c
src/auth/auth.c
src/auth/auth.h

index 0abec0931ef93b5adbad50bdecb7a16d0bfb2785..05d4819d8716693b17950379d9726cda1b32a0c3 100644 (file)
@@ -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);
        }
index 9fe918812021da028493c1ab2329600a03b6ce53..9f262ada72ba15b11ff03c4deef8d0adcd77fd74 100644 (file)
@@ -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 */
index f03b93e19e8b62d9541c116723d52b14448a6817..6e7cb1910ede8f921359d2d157dc00d0c26d9893 100644 (file)
@@ -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;
 }
index 275d79092538c9bec807191043dbf9bf347c3b17..4422600ce393cf7c777784dfea6053e4526f6c34 100644 (file)
@@ -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);
index 963ee6ec040b4f44682de5aab4d886eba64ddd04..7c8256dedf8aa72309f4fe77f283c6937d252b66 100644 (file)
@@ -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;