summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_fileinfo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-17 07:17:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:55 -0500
commitf4e5f3a498bce04312898dfe92104fafc1fc2aa2 (patch)
tree0ce2a234541dc79a81379da683f6a00529ac234b /source4/ntvfs/posix/pvfs_fileinfo.c
parent856f663adc2459044f7a20c2974bcb41ed561f77 (diff)
downloadsamba-f4e5f3a498bce04312898dfe92104fafc1fc2aa2.tar.gz
samba-f4e5f3a498bce04312898dfe92104fafc1fc2aa2.tar.bz2
samba-f4e5f3a498bce04312898dfe92104fafc1fc2aa2.zip
r3801: added allocation size rounding. This is needed for ifstest.
(This used to be commit 8a6fa43156667f75e058c7d44b1c15a6cf7067b2)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_fileinfo.c')
-rw-r--r--source4/ntvfs/posix/pvfs_fileinfo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_fileinfo.c b/source4/ntvfs/posix/pvfs_fileinfo.c
index dbf18edcce..32c7ae34fa 100644
--- a/source4/ntvfs/posix/pvfs_fileinfo.c
+++ b/source4/ntvfs/posix/pvfs_fileinfo.c
@@ -93,7 +93,7 @@ NTSTATUS pvfs_fill_dos_info(struct pvfs_state *pvfs, struct pvfs_filename *name,
name->dos.change_time += name->st.st_ctim.tv_nsec / 100;
#endif
name->dos.attrib = dos_mode_from_stat(pvfs, &name->st);
- name->dos.alloc_size = name->st.st_size;
+ name->dos.alloc_size = pvfs_round_alloc_size(pvfs, name->st.st_size);
name->dos.nlink = name->st.st_nlink;
name->dos.ea_size = 0;
name->dos.file_id = (((uint64_t)name->st.st_dev)<<32) | name->st.st_ino;
@@ -113,7 +113,8 @@ mode_t pvfs_fileperms(struct pvfs_state *pvfs, uint32 attrib)
mode |= S_IXUSR | S_IXGRP | S_IXOTH;
}
- if (!(attrib & FILE_ATTRIBUTE_READONLY)) {
+ if (!(attrib & FILE_ATTRIBUTE_READONLY) ||
+ (pvfs->flags & PVFS_FLAG_XATTR_ENABLE)) {
mode |= S_IWUSR;
}