aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/addr.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-28 15:27:52 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-09-28 15:27:52 +0100
commit916a45c6f97ae530a856143390abc602ad9b4d5e (patch)
treec44f27c7dd229b3cfe2e9ca1ca0f83dad1a435bd /src/libutil/addr.c
parent04127efebacaaa088668198cdbe52f933367b731 (diff)
downloadrspamd-916a45c6f97ae530a856143390abc602ad9b4d5e.tar.gz
rspamd-916a45c6f97ae530a856143390abc602ad9b4d5e.zip
[Minor] Oops, fix parsing of the Unix addresses
Diffstat (limited to 'src/libutil/addr.c')
-rw-r--r--src/libutil/addr.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c
index f6aed8bf4..138dc1318 100644
--- a/src/libutil/addr.c
+++ b/src/libutil/addr.c
@@ -339,6 +339,12 @@ rspamd_parse_unix_path (rspamd_inet_addr_t **target,
if (tokens[0] == NULL) {
return FALSE;
}
+
+ rspamd_strlcpy (addr->u.un->addr.sun_path, tokens[0],
+ sizeof (addr->u.un->addr.sun_path));
+#if defined(FREEBSD) || defined(__APPLE__)
+ addr->u.un->addr.sun_len = SUN_LEN (&addr->u.un->addr);
+#endif
}
else {
rspamd_strlcpy (addr->u.un->addr.sun_path, src,