aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2022-01-24 19:04:26 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2022-01-24 19:04:26 +0000
commit19bfd5e302954bf2ce1f892dc46ba1bb08c15aa8 (patch)
treee313a5356d64b095960bca6ccd569a99180ae5b2 /src/libserver
parent22db618165cfb1ee0f3ff808fd27603c55cf9234 (diff)
downloadrspamd-19bfd5e302954bf2ce1f892dc46ba1bb08c15aa8.tar.gz
rspamd-19bfd5e302954bf2ce1f892dc46ba1bb08c15aa8.zip
[Minor] Fix a name and the description of bogus `user` field in the task
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/protocol.c8
-rw-r--r--src/libserver/roll_history.c4
-rw-r--r--src/libserver/task.c6
-rw-r--r--src/libserver/task.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index eb82a743f..f09ec0b67 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -629,7 +629,7 @@ rspamd_protocol_handle_headers (struct rspamd_task *task,
*/
msg_debug_protocol ("read user header, value: %T", hv_tok);
if (!RSPAMD_TASK_IS_SPAMC (task)) {
- task->user = rspamd_mempool_ftokdup (task->task_pool,
+ task->auth_user = rspamd_mempool_ftokdup (task->task_pool,
hv_tok);
}
else {
@@ -964,9 +964,9 @@ urls_protocol_cb (struct rspamd_url *url, struct tree_cb_data *cb)
ucl_array_append (cb->top, obj);
if (cb->task->cfg->log_urls) {
- if (task->user) {
- user_field = task->user;
- len = strlen (task->user);
+ if (task->auth_user) {
+ user_field = task->auth_user;
+ len = strlen (task->auth_user);
has_user = TRUE;
}
else if (task->from_envelope) {
diff --git a/src/libserver/roll_history.c b/src/libserver/roll_history.c
index a8c1c42a9..45b847923 100644
--- a/src/libserver/roll_history.c
+++ b/src/libserver/roll_history.c
@@ -144,8 +144,8 @@ rspamd_roll_history_update (struct roll_history *history,
rspamd_strlcpy (row->message_id, MESSAGE_FIELD (task, message_id),
sizeof (row->message_id));
}
- if (task->user) {
- rspamd_strlcpy (row->user, task->user, sizeof (row->user));
+ if (task->auth_user) {
+ rspamd_strlcpy (row->user, task->auth_user, sizeof (row->user));
}
else {
row->user[0] = '\0';
diff --git a/src/libserver/task.c b/src/libserver/task.c
index fa97d67a5..244327b49 100644
--- a/src/libserver/task.c
+++ b/src/libserver/task.c
@@ -991,7 +991,7 @@ rspamd_task_log_check_condition (struct rspamd_task *task,
}
break;
case RSPAMD_LOG_USER:
- if (task->user) {
+ if (task->auth_user) {
ret = TRUE;
}
break;
@@ -1424,8 +1424,8 @@ rspamd_task_log_variable (struct rspamd_task *task,
}
break;
case RSPAMD_LOG_USER:
- if (task->user) {
- var.begin = task->user;
+ if (task->auth_user) {
+ var.begin = task->auth_user;
var.len = strlen (var.begin);
}
else {
diff --git a/src/libserver/task.h b/src/libserver/task.h
index ca49ed1e0..ca10c0105 100644
--- a/src/libserver/task.h
+++ b/src/libserver/task.h
@@ -173,7 +173,7 @@ struct rspamd_task {
rspamd_inet_addr_t *from_addr; /**< from addr for a task */
rspamd_inet_addr_t *client_addr; /**< address of connected socket */
gchar *deliver_to; /**< address to deliver */
- gchar *user; /**< user to deliver */
+ gchar *auth_user; /**< SMTP authenticated user */
const gchar *hostname; /**< hostname reported by MTA */
khash_t(rspamd_req_headers_hash) *request_headers; /**< HTTP headers in a request */
struct rspamd_task_data_storage msg; /**< message buffer */