From 01a6aef52227e0f029fa107140e670d8af45ad59 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Wed, 23 May 2018 15:04:08 -0700 Subject: [PATCH] vfs_gpfs: Adjust 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 Reviewed-by: Jeremy Allison --- source3/modules/vfs_gpfs.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index a0fd48fab7c..965dfac92a0 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1612,7 +1612,16 @@ 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); + return map_nt_error_from_unix(errno); + } 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); -- 2.47.2