]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_virsufilter: Fix the invocation of SMB_VFS_NEXT_CONNECT
authorRabinarayan Panigrahi <rapanigr@redhat.com>
Tue, 15 Jul 2025 15:45:49 +0000 (21:15 +0530)
committerJule Anger <janger@samba.org>
Fri, 22 Aug 2025 15:56:15 +0000 (15:56 +0000)
virusfilter is failing if path is defined for virusfilter:quarantine
as next module is not initialized by mean time. So rearranged invocation
of SMB_VFS_NEXT_CONNECT call

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15663

Signed-off-by: Rabinarayan Panigrahi <rapanigr@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Jul 21 11:28:12 UTC 2025 on atb-devel-224

(cherry picked from commit 605d4d065cd5951385a744230cf7f159468c02a2)

source3/modules/vfs_virusfilter.c

index b566b628ed2fe4e5be90077a4dd7575b77a4bc69..9b65f44de440a4516b6890d098a9f90e71a25a9b 100644 (file)
@@ -219,6 +219,11 @@ static int virusfilter_vfs_connect(
        int ret = -1;
        bool ok;
 
+       ret = SMB_VFS_NEXT_CONNECT(handle, svc, user);
+       if (ret < 0) {
+               return ret;
+       }
+
        config = talloc_zero(handle, struct virusfilter_config);
        if (config == NULL) {
                DBG_ERR("talloc_zero failed\n");
@@ -578,7 +583,7 @@ static int virusfilter_vfs_connect(
                }
        }
 
-       return SMB_VFS_NEXT_CONNECT(handle, svc, user);
+       return 0;
 }
 
 static void virusfilter_vfs_disconnect(struct vfs_handle_struct *handle)