From 652242f542e9be51338aa32d147682e72a7ddc20 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 23 Apr 2020 08:37:01 +0200 Subject: [PATCH] vfs_virusfilter: Fix canonicalizing socket path canonicalize_absolute_path() returns its result, the previous code was a no-op Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/modules/vfs_virusfilter.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source3/modules/vfs_virusfilter.c b/source3/modules/vfs_virusfilter.c index 256bf420eb1..ddac0c9a293 100644 --- a/source3/modules/vfs_virusfilter.c +++ b/source3/modules/vfs_virusfilter.c @@ -371,8 +371,12 @@ static int virusfilter_vfs_connect( config->socket_path = NULL; } if (config->socket_path != NULL) { - canonicalize_absolute_path(handle, - config->socket_path); + config->socket_path = canonicalize_absolute_path( + handle, config->socket_path); + if (config->socket_path == NULL) { + errno = ENOMEM; + return -1; + } } connect_timeout = lp_parm_int(snum, "virusfilter", -- 2.47.3