* ENODATA is not defined in FreeBSD
* ENOATTR is defined to be a synonym for ENODATA in Linux
* In its absence Samba already defines ENOATTR to either
ENODATA or ENOENT
Thus it is safe and correct to compare with ENOATTR rather
than ENODATA.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13774
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 23 21:59:10 CET 2019 on sn-devel-144
(cherry picked from commit
c99402724a65f4e1f8ed4dcd236a43e0603bef0a)
Autobuild-User(v4-10-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-10-test): Tue Feb 5 23:59:06 CET 2019 on sn-devel-144
if (ret > 0) {
return posixacl_xattr_to_smb_acl(buf, ret, mem_ctx);
}
- if (ret == 0 || errno == ENOATTR || errno == ENODATA) {
+ if (ret == 0 || errno == ENOATTR) {
mode_t mode = 0;
TALLOC_CTX *frame = talloc_stackframe();
struct smb_filename *smb_fname_tmp =
if (ret > 0) {
return posixacl_xattr_to_smb_acl(buf, ret, mem_ctx);
}
- if (ret == 0 || errno == ENOATTR || errno == ENODATA) {
+ if (ret == 0 || errno == ENOATTR) {
SMB_STRUCT_STAT sbuf;
ret = SMB_VFS_FSTAT(fsp, &sbuf);
if (ret == 0)
ret = glfs_getxattr(handle->data, path, key_buf, val_buf, NAME_MAX + 1);
if (ret == -1) {
- if (errno == ENODATA) {
+ if (errno == ENOATTR) {
errno = EOPNOTSUPP;
}
return -1;
ret = getxattr(path, key_buf, val_buf, NAME_MAX + 1);
if (ret == -1) {
- if (errno == ENODATA) {
+ if (errno == ENOATTR) {
errno = EOPNOTSUPP;
}
return -1;