summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-15 18:27:21 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-15 20:03:00 +1100
commitc5cfda9e8a8826dbc2ade5116b0648575efe5ae7 (patch)
treef10ee6b84b6b201cf39b93674791e80224eb9f54 /source4/ntvfs/posix
parent3c028ff88b7f8b4a19a058ee44aeb42c10f4b398 (diff)
downloadsamba-c5cfda9e8a8826dbc2ade5116b0648575efe5ae7.tar.gz
samba-c5cfda9e8a8826dbc2ade5116b0648575efe5ae7.tar.bz2
samba-c5cfda9e8a8826dbc2ade5116b0648575efe5ae7.zip
s4-pvfs: implement root_fid support in posix backend
Construct the filename from the old handle and the new name.
Diffstat (limited to 'source4/ntvfs/posix')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 46e39a00dd..e8f1c0c4c8 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -1272,6 +1272,21 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
return NT_STATUS_ACCESS_DENIED;
}
+ /* cope with non-zero root_fid */
+ if (io->ntcreatex.in.root_fid.ntvfs != NULL) {
+ f = pvfs_find_fd(pvfs, req, io->ntcreatex.in.root_fid.ntvfs);
+ if (f == NULL) {
+ return NT_STATUS_INVALID_HANDLE;
+ }
+ if (f->handle->fd != -1) {
+ return NT_STATUS_INVALID_DEVICE_REQUEST;
+ }
+ io->ntcreatex.in.fname = talloc_asprintf(req, "%s\\%s",
+ f->handle->name->original_name,
+ io->ntcreatex.in.fname);
+ NT_STATUS_HAVE_NO_MEMORY(io->ntcreatex.in.fname);
+ }
+
if (io->ntcreatex.in.file_attr & (FILE_ATTRIBUTE_DEVICE|
FILE_ATTRIBUTE_VOLUME|
(~FILE_ATTRIBUTE_ALL_MASK))) {