]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_virusfilter: Fix canonicalizing socket path
authorVolker Lendecke <vl@samba.org>
Thu, 23 Apr 2020 06:37:01 +0000 (08:37 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 May 2020 11:48:38 +0000 (11:48 +0000)
canonicalize_absolute_path() returns its result, the previous code was
a no-op

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_virusfilter.c

index 256bf420eb1ca1ba26f604c29561667f26788f5b..ddac0c9a293a73d7a23d6cf01e7d2133a3768dde 100644 (file)
@@ -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",