svn commit: samba r4264 - in branches/SAMBA_4_0/source/ntvfs/posix:
.
tridge at samba.org
tridge at samba.org
Sat Dec 18 23:31:17 GMT 2004
Author: tridge
Date: 2004-12-18 23:31:17 +0000 (Sat, 18 Dec 2004)
New Revision: 4264
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4264
Log:
fix acl handling on systems without xattr support
Modified:
branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c
Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c 2004-12-18 04:38:43 UTC (rev 4263)
+++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_xattr.c 2004-12-18 23:31:17 UTC (rev 4264)
@@ -35,12 +35,24 @@
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 @@
&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 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,
More information about the samba-cvs
mailing list