From: Rabinarayan Panigrahi Date: Tue, 15 Jul 2025 15:45:49 +0000 (+0530) Subject: vfs_virsufilter: Fix the invocation of SMB_VFS_NEXT_CONNECT X-Git-Tag: samba-4.21.8~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e71799c9bb34a2214f8e76b396e139c8a06e4e27;p=thirdparty%2Fsamba.git vfs_virsufilter: Fix the invocation of SMB_VFS_NEXT_CONNECT 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 Reviewed-by: Anoop C S Reviewed-by: Guenther Deschner Reviewed-by: Ralph Boehme Autobuild-User(master): Anoop C S Autobuild-Date(master): Mon Jul 21 11:28:12 UTC 2025 on atb-devel-224 (cherry picked from commit 605d4d065cd5951385a744230cf7f159468c02a2) --- diff --git a/source3/modules/vfs_virusfilter.c b/source3/modules/vfs_virusfilter.c index b566b628ed2..9b65f44de44 100644 --- a/source3/modules/vfs_virusfilter.c +++ b/source3/modules/vfs_virusfilter.c @@ -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)