]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm auth: Change auth cache flush command to support user-mask
authorMarkus Valentin <markus.valentin@open-xchange.com>
Tue, 20 Jan 2026 10:00:46 +0000 (11:00 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 23 Jan 2026 09:34:59 +0000 (09:34 +0000)
Change the "user" parameter of for doveadm-auth from a username array
to user-mask array.

src/doveadm/doveadm-auth.c

index 23b8ff347fc17b7b455f7bcaeaf38c5d225d6555..0e904907819ab672df4089d579a702e51a7aa4aa 100644 (file)
@@ -481,17 +481,17 @@ static void cmd_auth_cache_flush(struct doveadm_cmd_context *cctx)
 {
        const char *master_socket_path;
        struct auth_master_connection *conn;
-       const char *const *users = NULL;
+       const char *const *user_masks = NULL;
        unsigned int count;
 
        if (!doveadm_cmd_param_str(cctx, "socket-path", &master_socket_path)) {
                master_socket_path = t_strconcat(doveadm_settings->base_dir,
                                                 "/auth-master", NULL);
        }
-       (void)doveadm_cmd_param_array(cctx, "user", &users);
+       (void)doveadm_cmd_param_array(cctx, "user-mask", &user_masks);
 
        conn = doveadm_get_auth_master_conn(master_socket_path);
-       if (auth_master_cache_flush(conn, users, &count) < 0) {
+       if (auth_master_cache_flush(conn, user_masks, &count) < 0) {
                e_error(cctx->event, "Cache flush failed");
                doveadm_exit_code = EX_TEMPFAIL;
        } else {
@@ -950,10 +950,10 @@ DOVEADM_CMD_PARAMS_END
 {
        .cmd = cmd_auth_cache_flush,
        .name = "auth cache flush",
-       .usage = "[-a <master socket path>] [<user> [...]]",
+       .usage = "[-a <master socket path>] [<user-mask> [...]]",
 DOVEADM_CMD_PARAMS_START
 DOVEADM_CMD_PARAM('a', "socket-path", CMD_PARAM_STR, 0)
-DOVEADM_CMD_PARAM('\0', "user", CMD_PARAM_ARRAY, CMD_PARAM_FLAG_POSITIONAL)
+DOVEADM_CMD_PARAM('\0', "user-mask", CMD_PARAM_ARRAY, CMD_PARAM_FLAG_POSITIONAL)
 DOVEADM_CMD_PARAMS_END
 },
 {