From: Christof Schmitt Date: Wed, 23 May 2018 22:04:08 +0000 (-0700) Subject: vfs_gpfs: Adjust debug level when get_winattrs returns EBADF X-Git-Tag: ldb-1.4.0~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01a6aef52227e0f029fa107140e670d8af45ad59;p=thirdparty%2Fsamba.git 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 --- 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);