summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-05 22:48:09 +1100
committerAndrew Tridgell <tridge@samba.org>2010-03-05 23:07:32 +1100
commit2c2156ea9539a818625b0914aa2e1596571f428f (patch)
tree271c8af5559d8ae86ddc6673ccd95da69883885a /source4
parentdae9d20e14cafb7b688a7aa3f3680dafd727fa3f (diff)
downloadsamba-2c2156ea9539a818625b0914aa2e1596571f428f.tar.gz
samba-2c2156ea9539a818625b0914aa2e1596571f428f.tar.bz2
samba-2c2156ea9539a818625b0914aa2e1596571f428f.zip
s4-pvfs: use pvfs_sys_fchmod()
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c2
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c4
-rw-r--r--source4/ntvfs/posix/pvfs_util.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index f88e21e738..da32c7f9b6 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -1625,7 +1625,7 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
mode_t mode = pvfs_fileperms(pvfs, attrib);
if (f->handle->name->st.st_mode != mode &&
f->handle->name->dos.attrib != attrib &&
- fchmod(fd, mode) == -1) {
+ pvfs_sys_fchmod(pvfs, fd, mode) == -1) {
talloc_free(lck);
return pvfs_map_errno(pvfs, errno);
}
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index b40ae9c9de..ca8e9cbe3f 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -534,7 +534,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
}
mode = pvfs_fileperms(pvfs, newstats.dos.attrib);
if (!(h->name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY)) {
- if (fchmod(h->fd, mode) == -1) {
+ if (pvfs_sys_fchmod(pvfs, h->fd, mode) == -1) {
return pvfs_map_errno(pvfs, errno);
}
}
@@ -859,7 +859,7 @@ NTSTATUS pvfs_setpathinfo(struct ntvfs_module_context *ntvfs,
newstats.dos.attrib |= (name->dos.attrib & FILE_ATTRIBUTE_DIRECTORY);
if (newstats.dos.attrib != name->dos.attrib) {
mode_t mode = pvfs_fileperms(pvfs, newstats.dos.attrib);
- if (chmod(name->full_name, mode) == -1) {
+ if (pvfs_sys_chmod(pvfs, name->full_name, mode) == -1) {
return pvfs_map_errno(pvfs, errno);
}
change_mask |= FILE_NOTIFY_CHANGE_ATTRIBUTES;
diff --git a/source4/ntvfs/posix/pvfs_util.c b/source4/ntvfs/posix/pvfs_util.c
index 63651c203a..8dedf13a63 100644
--- a/source4/ntvfs/posix/pvfs_util.c
+++ b/source4/ntvfs/posix/pvfs_util.c
@@ -145,7 +145,7 @@ NTSTATUS pvfs_copy_file(struct pvfs_state *pvfs,
close(fd1);
mode = pvfs_fileperms(pvfs, name1->dos.attrib);
- if (fchmod(fd2, mode) == -1) {
+ if (pvfs_sys_fchmod(pvfs, fd2, mode) == -1) {
status = pvfs_map_errno(pvfs, errno);
close(fd2);
pvfs_sys_unlink(pvfs, name2->full_name);