info.remote_ip = input->info.remote_ip;
info.remote_port = input->info.remote_port;
info.initial_resp_base64 = str_c(base64_resp);
+ if (doveadm_settings->auth_debug)
+ info.flags |= AUTH_REQUEST_FLAG_DEBUG;
input->request = auth_client_request_new(client, &info,
auth_callback, input);
auth_master_deinit(&conn);
}
+static void authtest_input_init(struct authtest_input *input)
+{
+ memset(input, 0, sizeof(*input));
+ input->info.service = "doveadm";
+ input->info.debug = doveadm_settings->auth_debug;
+}
+
static void cmd_auth_test(int argc, char *argv[])
{
const char *auth_socket_path = NULL;
struct authtest_input input;
int c;
- memset(&input, 0, sizeof(input));
- input.info.service = "doveadm";
-
+ authtest_input_init(&input);
while ((c = getopt(argc, argv, "a:M:x:")) > 0) {
switch (c) {
case 'a':
struct authtest_input input;
int c;
- memset(&input, 0, sizeof(input));
- input.info.service = "doveadm";
-
+ authtest_input_init(&input);
auth_login_socket_path = t_strconcat(doveadm_settings->base_dir,
"/auth-login", NULL);
auth_master_socket_path = t_strconcat(doveadm_settings->base_dir,
bool first = TRUE;
int c, ret;
- memset(&input, 0, sizeof(input));
- input.info.service = "doveadm";
-
+ authtest_input_init(&input);
while ((c = getopt(argc, argv, "a:f:x:")) > 0) {
switch (c) {
case 'a':
service_input.local_port = input->info.local_port;
service_input.remote_ip = input->info.remote_ip;
service_input.remote_port = input->info.remote_port;
+ service_input.debug = input->info.debug;
pool = pool_alloconly_create("userdb fields", 1024);
mail_storage_service_save_userdb_fields(storage_service, pool,
bool have_wildcards, userdb_only = FALSE, first = TRUE;
int c, ret;
- memset(&input, 0, sizeof(input));
- input.info.service = "doveadm";
-
+ authtest_input_init(&input);
while ((c = getopt(argc, argv, "a:f:ux:")) > 0) {
switch (c) {
case 'a':
DEF(SET_STR, libexec_dir),
DEF(SET_STR, mail_plugins),
DEF(SET_STR, mail_plugin_dir),
+ DEF(SET_BOOL, auth_debug),
DEF(SET_STR, auth_socket_path),
DEF(SET_STR, doveadm_socket_path),
DEF(SET_UINT, doveadm_worker_count),
.libexec_dir = PKG_LIBEXECDIR,
.mail_plugins = "",
.mail_plugin_dir = MODULEDIR,
+ .auth_debug = FALSE,
.auth_socket_path = "auth-userdb",
.doveadm_socket_path = "doveadm-server",
.doveadm_worker_count = 0,