]> 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)
committerAnoop C S <anoopcs@samba.org>
Mon, 21 Jul 2025 11:28:12 +0000 (11:28 +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

source3/modules/vfs_virusfilter.c

index c0cf9ff78db598d5dcf04e4281e98f291c2aacd4..547dd172b86d8edca61d15346a656179d9a9d8da 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)