io_remove(&conn->io);
}
- if (conn->auth->set->debug) {
- i_debug("client passdb out: %s",
- conn->auth->set->debug_passwords ?
- cmd : reply_line_hide_pass(cmd));
- }
+ e_debug(conn->event, "client passdb out: %s",
+ conn->auth->set->debug_passwords ?
+ cmd : reply_line_hide_pass(cmd));
}
static void auth_callback(const char *reply,
auth_request_handler_set(conn->request_handler, conn->connect_uid, pid);
conn->pid = pid;
- if (conn->auth->set->debug)
- i_debug("auth client connected (pid=%u)", conn->pid);
+ e_debug(conn->event, "auth client connected (pid=%u)", conn->pid);
return TRUE;
}
{
if (str_begins(line, "AUTH\t")) {
if (conn->auth->set->debug) {
- i_debug("client in: %s",
+ e_debug(conn->event, "client in: %s",
auth_line_hide_pass(conn, line));
}
return auth_request_handler_auth_begin(conn->request_handler,
}
if (str_begins(line, "CONT\t")) {
if (conn->auth->set->debug) {
- i_debug("client in: %s",
+ e_debug(conn->event, "client in: %s",
cont_line_hide_pass(conn, line));
}
return auth_request_handler_auth_continue(conn->request_handler,
}
if (str_begins(line, "CANCEL\t")) {
if (conn->auth->set->debug)
- i_debug("client in: %s", line);
+ e_debug(conn->event, "client in: %s", line);
return auth_client_cancel(conn, line + 7);
}
{
struct const_iovec iov[2];
- if (conn->auth->set->debug) {
- i_debug("master userdb out: %s",
- auth_master_reply_hide_passwords(conn, reply));
- }
+ e_debug(auth_event, "master userdb out: %s",
+ auth_master_reply_hide_passwords(conn, reply));
iov[0].iov_base = reply;
iov[0].iov_len = strlen(reply);
break;
}
- if (conn->auth->set->debug) {
- i_debug("userdb out: %s",
- auth_master_reply_hide_passwords(conn, str_c(str)));
- }
+ e_debug(auth_event, "userdb out: %s",
+ auth_master_reply_hide_passwords(conn, str_c(str)));
str_append_c(str, '\n');
o_stream_nsend(conn->output, str_data(str), str_len(str));
break;
}
- if (conn->auth->set->debug)
- i_debug("passdb out: %s", str_c(str));
+ e_debug(auth_event, "passdb out: %s", str_c(str));
str_append_c(str, '\n');
o_stream_nsend(conn->output, str_data(str), str_len(str));
static bool
auth_master_input_line(struct auth_master_connection *conn, const char *line)
{
- if (conn->auth->set->debug)
- i_debug("master in: %s", line);
+ e_debug(auth_event, "master in: %s", line);
if (str_begins(line, "USER\t"))
return master_input_user(conn, line + 5);
break;
}
- if (conn->auth->set->debug)
- i_debug("postfix out: %s", str_c(str));
+ e_debug(auth_event, "postfix out: %s", str_c(str));
str_append_c(str, '\n');
o_stream_nsend(conn->output, str_data(str), str_len(str));
static bool
auth_postfix_input_line(struct auth_postfix_connection *conn, const char *line)
{
- if (conn->auth->set->debug)
- i_debug("postfix in: %s", line);
+ e_debug(auth_event, "postfix in: %s", line);
if (strncasecmp(line, "get ", 4) == 0)
return postfix_input_user(conn, line + 4);
{
va_list va;
- if (!auth_request->debug)
- return;
-
va_start(va, format);
T_BEGIN {
- i_debug("%s", get_log_str(auth_request, subsystem, format, va));
+ e_debug(auth_request->event, "%s", get_log_str(auth_request, subsystem, format, va));
} T_END;
va_end(va);
}
if (close(fd) < 0)
i_error("close(%s) failed: %m", path);
- if (global_auth_settings->debug)
- i_debug("Read auth token secret from %s", path);
+ e_debug(auth_event, "Read auth token secret from %s", path);
return ret;
}
return -1;
}
- if (global_auth_settings->debug)
- i_debug("Wrote new auth token secret to %s", path);
+ e_debug(auth_event, "Wrote new auth token secret to %s", path);
return 0;
}
request->request.attributes = conn->iterate_attr_names;
request->request.multi_entry = TRUE;
- if (global_auth_settings->debug) {
- i_debug("ldap: iterate: base=%s scope=%s filter=%s fields=%s",
- request->request.base, conn->set.scope,
- request->request.filter, attr_names == NULL ? "(all)" :
- t_strarray_join(attr_names, ","));
- }
+ e_debug(auth_request->event, "ldap: iterate: base=%s scope=%s filter=%s fields=%s",
+ request->request.base, conn->set.scope,
+ request->request.filter, attr_names == NULL ? "(all)" :
+ t_strarray_join(attr_names, ","));
request->request.request.callback = userdb_ldap_iterate_callback;
db_ldap_request(conn, &request->request.request);
return &ctx->ctx;
}
} else if (str_begins(key, "forward_")) {
/* these are passed to upstream */
- } else if (client->set->auth_debug)
- i_debug("Ignoring unknown passdb extra field: %s", key);
+ } else
+ e_debug(event_auth, "Ignoring unknown passdb extra field: %s", key);
}
if (array_count(&alt_usernames) > 0) {
const char **alt;