[PATCH] vfs_gpfs: Asjust debug level when get_winattrs returns EBADF

Christof Schmitt cs at samba.org
Wed May 23 22:55:51 UTC 2018


Small fix for vfs_gpfs module.

Please review.

Christof
-------------- next part --------------
From 961e56ebba18d55ec12e631a0ede42ab0fcae77b Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Wed, 23 May 2018 15:04:08 -0700
Subject: [PATCH] vfs_gpfs: Asjust debug level when get_winattrs returns EBADF

This is returned for a get_winattrs call against a non-gpfs file system.
This can happen for the .. entry when listing a share on the file system
root.

Signed-off-by: Christof Schmitt <cs at samba.org>
---
 source3/modules/vfs_gpfs.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index a0fd48f..749c1dd 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -1612,7 +1612,15 @@ static NTSTATUS vfs_gpfs_get_dos_attributes(struct vfs_handle_struct *handle,
 	if (ret == -1 && errno == EACCES) {
 		ret = get_dos_attr_with_capability(smb_fname, &attrs);
 	}
-	if (ret == -1) {
+
+	if (ret == -1 && errno == EBADF) {
+		/*
+		 * Returned for directory listings in gpfs root for
+		 * .. entry which steps out of gpfs.
+		 */
+		DBG_DEBUG("Getting winattrs for %s returned EBADF.\n",
+			  smb_fname->base_name);
+	} else if (ret == -1) {
 		DBG_WARNING("Getting winattrs failed for %s: %s\n",
 			    smb_fname->base_name, strerror(errno));
 		return map_nt_error_from_unix(errno);
-- 
1.8.3.1



More information about the samba-technical mailing list