diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-30 03:19:27 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:07:44 -0500 |
commit | 1c092c5ba6c812e05b63b633c8e9bf0f5ac3deb3 (patch) | |
tree | 763d85cb8f59da3f9e7ac29225e816d8ec577a15 /source4/ntvfs/posix/pvfs_setfileinfo.c | |
parent | 1e4a4c4d6e8ce13378cfa54730159b19911af8a1 (diff) | |
download | samba-1c092c5ba6c812e05b63b633c8e9bf0f5ac3deb3.tar.gz samba-1c092c5ba6c812e05b63b633c8e9bf0f5ac3deb3.tar.xz samba-1c092c5ba6c812e05b63b633c8e9bf0f5ac3deb3.zip |
r4406: - don't call the xattr unlink hook on unlink unless the link count is 1, otherwise
the xattrs of the remaining link are removed
- fix the handling of attribute set on directories
(This used to be commit fa44e3cce00b75656c85378c7825960540d2f282)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_setfileinfo.c')
-rw-r--r-- | source4/ntvfs/posix/pvfs_setfileinfo.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c index 295d2e919e0..31db6ce6306 100644 --- a/source4/ntvfs/posix/pvfs_setfileinfo.c +++ b/source4/ntvfs/posix/pvfs_setfileinfo.c @@ -365,12 +365,10 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs, /* possibly change the attribute */ if (newstats.dos.attrib != h->name->dos.attrib) { mode_t mode = pvfs_fileperms(pvfs, newstats.dos.attrib); - if (h->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY) { - /* ignore on directories for now */ - return NT_STATUS_OK; - } - if (fchmod(h->fd, mode) == -1) { - return pvfs_map_errno(pvfs, errno); + if (!(h->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY)) { + if (fchmod(h->fd, mode) == -1) { + return pvfs_map_errno(pvfs, errno); + } } } |