summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_setfileinfo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-24 12:39:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:02:26 -0500
commitd5817271384ff74b3d0577d675476c28ccc0074b (patch)
tree5bae0e551757a315765b61e5a4244e4ec2da8646 /source4/ntvfs/posix/pvfs_setfileinfo.c
parente9381dfd707a7b7ff9faca6e12262a2b2f9f193a (diff)
downloadsamba-d5817271384ff74b3d0577d675476c28ccc0074b.tar.gz
samba-d5817271384ff74b3d0577d675476c28ccc0074b.tar.bz2
samba-d5817271384ff74b3d0577d675476c28ccc0074b.zip
r3153: pvfs now passes the first 9 of the BASE-DELETE tests
(This used to be commit f8041feaebc9170763ce04d2dd90cfc1c7889c21)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_setfileinfo.c')
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 8892c92c3c..0de87b8584 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -33,6 +33,7 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
struct pvfs_state *pvfs = ntvfs->private_data;
struct utimbuf unix_times;
struct pvfs_file *f;
+ uint32_t create_options;
f = pvfs_find_fd(pvfs, req, info->generic.file.fnum);
if (!f) {
@@ -65,6 +66,18 @@ NTSTATUS pvfs_setfileinfo(struct ntvfs_module_context *ntvfs,
return NT_STATUS_ACCESS_DENIED;
}
break;
+ case RAW_SFILEINFO_DISPOSITION_INFO:
+ if (!(f->access_mask & STD_RIGHT_DELETE_ACCESS)) {
+ return NT_STATUS_ACCESS_DENIED;
+ }
+ create_options = f->create_options;
+ if (info->disposition_info.in.delete_on_close) {
+ create_options |= NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
+ } else {
+ create_options &= ~NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
+ }
+ return pvfs_change_create_options(pvfs, req, f, create_options);
}
+
return NT_STATUS_OK;
}