diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-18 23:31:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:30 -0500 |
commit | 114bcfe837699083be2a5145b9f44092a649cae4 (patch) | |
tree | 02fa67f325a9e1f686bcf10e58ac8433b48b42ff /source4/ntvfs/posix | |
parent | ed42a64901ba0a7ad8cbaac582600688af1b7d72 (diff) | |
download | samba-114bcfe837699083be2a5145b9f44092a649cae4.tar.gz samba-114bcfe837699083be2a5145b9f44092a649cae4.tar.bz2 samba-114bcfe837699083be2a5145b9f44092a649cae4.zip |
r4264: fix acl handling on systems without xattr support
(This used to be commit 89845388ea82d9bfbdc6ca8da40f47437a270400)
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r-- | source4/ntvfs/posix/pvfs_xattr.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/source4/ntvfs/posix/pvfs_xattr.c b/source4/ntvfs/posix/pvfs_xattr.c index 4487663e8d..baa6c15e31 100644 --- a/source4/ntvfs/posix/pvfs_xattr.c +++ b/source4/ntvfs/posix/pvfs_xattr.c @@ -35,12 +35,24 @@ static NTSTATUS pull_xattr_blob(struct pvfs_state *pvfs, size_t estimated_size, DATA_BLOB *blob) { + NTSTATUS status; + if (pvfs->ea_db) { return pull_xattr_blob_tdb(pvfs, mem_ctx, attr_name, fname, fd, estimated_size, blob); } - return pull_xattr_blob_system(pvfs, mem_ctx, attr_name, fname, - fd, estimated_size, blob); + + status = pull_xattr_blob_system(pvfs, mem_ctx, attr_name, fname, + fd, estimated_size, blob); + + /* if the filesystem doesn't support them, then tell pvfs not to try again */ + if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { + DEBUG(5,("pvfs_xattr: xattr not supported in filesystem\n")); + pvfs->flags &= ~PVFS_FLAG_XATTR_ENABLE; + status = NT_STATUS_NOT_FOUND; + } + + return status; } /* @@ -158,14 +170,6 @@ NTSTATUS pvfs_dosattrib_load(struct pvfs_state *pvfs, struct pvfs_filename *name &attrib, (ndr_pull_flags_fn_t)ndr_pull_xattr_DosAttrib); - /* if the filesystem doesn't support them, then tell pvfs not to try again */ - if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { - DEBUG(5,("pvfs_xattr: xattr not supported in filesystem\n")); - pvfs->flags &= ~PVFS_FLAG_XATTR_ENABLE; - talloc_free(mem_ctx); - return NT_STATUS_OK; - } - /* not having a DosAttrib is not an error */ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { talloc_free(mem_ctx); @@ -341,7 +345,7 @@ NTSTATUS pvfs_acl_load(struct pvfs_state *pvfs, struct pvfs_filename *name, int NTSTATUS status; ZERO_STRUCTP(acl); if (!(pvfs->flags & PVFS_FLAG_XATTR_ENABLE)) { - return NT_STATUS_OK; + return NT_STATUS_NOT_FOUND; } status = pvfs_xattr_ndr_load(pvfs, acl, name->full_name, fd, XATTR_NTACL_NAME, |