"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/doveadm/doveadm-auth-server.c" between
dovecot-2.3.16.tar.gz and dovecot-2.3.17.tar.gz

About: Dovecot is an IMAP and POP3 server, written with security primarily in mind.

doveadm-auth-server.c  (dovecot-2.3.16):doveadm-auth-server.c  (dovecot-2.3.17)
skipping to change at line 205 skipping to change at line 205
} }
} }
if (auth_master_user_list_deinit(&ctx) < 0) { if (auth_master_user_list_deinit(&ctx) < 0) {
i_error("user listing failed"); i_error("user listing failed");
doveadm_exit_code = EX_DATAERR; doveadm_exit_code = EX_DATAERR;
} }
o_stream_nsend_str(doveadm_print_ostream, "]}"); o_stream_nsend_str(doveadm_print_ostream, "]}");
} }
static void cmd_auth_cache_flush(int argc, char *argv[]) static void cmd_auth_cache_flush(struct doveadm_cmd_context *cctx)
{ {
const char *master_socket_path = NULL; const char *master_socket_path, *const *users;
struct auth_master_connection *conn; struct auth_master_connection *conn;
unsigned int count; unsigned int count;
int c;
while ((c = getopt(argc, argv, "a:")) > 0) { if (!doveadm_cmd_param_str(cctx, "socket-path", &master_socket_path)) {
switch (c) {
case 'a':
master_socket_path = optarg;
break;
default:
doveadm_exit_code = EX_USAGE;
return;
}
}
argv += optind;
if (master_socket_path == NULL) {
master_socket_path = t_strconcat(doveadm_settings->base_dir, master_socket_path = t_strconcat(doveadm_settings->base_dir,
"/auth-master", NULL); "/auth-master", NULL);
} }
if (!doveadm_cmd_param_array(cctx, "user", &users))
i_fatal("Missing user parameter");
conn = doveadm_get_auth_master_conn(master_socket_path); conn = doveadm_get_auth_master_conn(master_socket_path);
if (auth_master_cache_flush(conn, (void *)argv, &count) < 0) { if (auth_master_cache_flush(conn, users, &count) < 0) {
i_error("Cache flush failed"); i_error("Cache flush failed");
doveadm_exit_code = EX_TEMPFAIL; doveadm_exit_code = EX_TEMPFAIL;
} else { } else {
doveadm_print_init("formatted"); doveadm_print_init("formatted");
doveadm_print_formatted_set_format("%{entries} cache entries flus hed\n"); doveadm_print_formatted_set_format("%{entries} cache entries flus hed\n");
doveadm_print_header_simple("entries"); doveadm_print_header_simple("entries");
doveadm_print_num(count); doveadm_print_num(count);
} }
auth_master_deinit(&conn); auth_master_deinit(&conn);
} }
skipping to change at line 498 skipping to change at line 487
if (storage_service != NULL) if (storage_service != NULL)
mail_storage_service_deinit(&storage_service); mail_storage_service_deinit(&storage_service);
if (conn != NULL) if (conn != NULL)
auth_master_deinit(&conn); auth_master_deinit(&conn);
} }
static static
struct doveadm_cmd_ver2 doveadm_cmd_auth_server[] = { struct doveadm_cmd_ver2 doveadm_cmd_auth_server[] = {
{ {
.name = "auth cache flush", .name = "auth cache flush",
.old_cmd = cmd_auth_cache_flush, .cmd = cmd_auth_cache_flush,
.usage = "[-a <master socket path>] [<user> [...]]", .usage = "[-a <master socket path>] [<user> [...]]",
DOVEADM_CMD_PARAMS_START DOVEADM_CMD_PARAMS_START
DOVEADM_CMD_PARAM('a', "socket-path", CMD_PARAM_STR, 0) 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", CMD_PARAM_ARRAY, CMD_PARAM_FLAG_POSITIONAL)
DOVEADM_CMD_PARAMS_END DOVEADM_CMD_PARAMS_END
}, },
{ {
.name = "user", .name = "user",
.cmd = cmd_user_ver2, .cmd = cmd_user_ver2,
.usage = "[-a <userdb socket path>] [-x <auth info>] [-f field] [-e <valu e>] [-u] <user mask> [...]", .usage = "[-a <userdb socket path>] [-x <auth info>] [-f field] [-e <valu e>] [-u] <user mask> [...]",
 End of changes. 7 change blocks. 
18 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)