[PATCH] Fix build in two VFS modules not built by default

Ralph Böhme slow at samba.org
Mon Oct 17 12:22:46 UTC 2016


Hi!

Attached patch fixes the build with two non-standard VFS modules. One
is my fault in vfs_gpfs, the other one is part of the recent
vfs_virusscanner patchsets.

Cheerio!
-slow
-------------- next part --------------
From 3f63b386c833156bbf96276732d78f113d2cb043 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Mon, 17 Oct 2016 14:15:41 +0200
Subject: [PATCH 1/2] s3/vfs: tsmsm: add missing ;

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 source3/modules/vfs_tsmsm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index aa0ae96..eba19ff 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -521,7 +521,7 @@ static NTSTATUS tsmsm_set_offline(struct vfs_handle_struct *handle,
 		return NT_STATUS_NO_MEMORY;
 	}
 	DEBUG(10, ("tsmsm_set_offline: Running [%s]\n", command));
-	result = smbrun(command, NULL, NULL)
+	result = smbrun(command, NULL, NULL);
 	if(result != 0) {
 		DEBUG(1,("tsmsm_set_offline: Running [%s] returned %d\n", command, result));
 		TALLOC_FREE(command);
-- 
2.7.4


From fe72ef93b0ebd5ec68b9a0ed9c5a836f1ca712eb Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Mon, 17 Oct 2016 14:16:20 +0200
Subject: [PATCH 2/2] s3/vfs: gpfs: adapt vfs_gpfs_is_offline() to changes from
 3031815f982e365be50148564d47d7d5afab46e0

The patchset `git log -2 3031815f982e365be50148564d47d7d5afab46e0`
missed a change to vfs_gpfs_is_offline() which is now merely a helper
function that returns true or false and mustn't call into the VFS.

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 source3/modules/vfs_gpfs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 28da8e2..89ce3b7 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -2007,13 +2007,12 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle,
 				return -1);
 
 	if (!config->winattr) {
-		return SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
+		return false;
 	}
 
 	status = get_full_smb_filename(talloc_tos(), fname, &path);
 	if (!NT_STATUS_IS_OK(status)) {
-		errno = map_errno_from_nt_status(status);
-		return -1;
+		return false;
 	}
 
 	ret = gpfswrap_get_winattrs_path(path, &attrs);
@@ -2029,7 +2028,7 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct *handle,
 	}
 	DEBUG(10, ("%s is online\n", path));
 	TALLOC_FREE(path);
-	return SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
+	return false;
 }
 
 static bool vfs_gpfs_fsp_is_offline(struct vfs_handle_struct *handle,
-- 
2.7.4



More information about the samba-technical mailing list