From d5817271384ff74b3d0577d675476c28ccc0074b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 24 Oct 2004 12:39:15 +0000 Subject: r3153: pvfs now passes the first 9 of the BASE-DELETE tests (This used to be commit f8041feaebc9170763ce04d2dd90cfc1c7889c21) --- source4/ntvfs/posix/pvfs_setfileinfo.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source4/ntvfs/posix/pvfs_setfileinfo.c') 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; } -- cgit