summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/ntvfs_generic.c3
-rw-r--r--source4/ntvfs/posix/pvfs_open.c18
2 files changed, 21 insertions, 0 deletions
diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c
index 4edc31c22cc..fe68b4132bc 100644
--- a/source4/ntvfs/ntvfs_generic.c
+++ b/source4/ntvfs/ntvfs_generic.c
@@ -236,6 +236,8 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs,
io->smb2.out.file_attr = io2->generic.out.attrib;
io->smb2.out.reserved2 = 0;
io->smb2.out.maximal_access = io2->generic.out.maximal_access;
+ memcpy(io->smb2.out.on_disk_id, io2->generic.out.on_disk_id,
+ sizeof(io2->generic.out.on_disk_id));
break;
default:
@@ -529,6 +531,7 @@ NTSTATUS ntvfs_map_open(struct ntvfs_module_context *ntvfs,
io2->generic.in.sec_desc = io->smb2.in.sec_desc;
io2->generic.in.ea_list = &io->smb2.in.eas;
io2->generic.in.query_maximal_access = io->smb2.in.query_maximal_access;
+ io2->generic.in.query_on_disk_id = io->smb2.in.query_on_disk_id;
io2->generic.in.private_flags = 0;
/* we don't support timewarp yet */
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index ceee64255f2..48d2712315f 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -407,6 +407,12 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs,
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
+ if (io->generic.in.query_on_disk_id) {
+ ZERO_ARRAY(io->generic.out.on_disk_id);
+ SBVAL(io->generic.out.on_disk_id, 0, name->st.st_ino);
+ SBVAL(io->generic.out.on_disk_id, 8, name->st.st_dev);
+ }
+
/* the open succeeded, keep this handle permanently */
status = ntvfs_handle_set_backend_data(h, pvfs->ntvfs, f);
if (!NT_STATUS_IS_OK(status)) {
@@ -722,6 +728,12 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs,
}
}
+ if (io->generic.in.query_on_disk_id) {
+ ZERO_ARRAY(io->generic.out.on_disk_id);
+ SBVAL(io->generic.out.on_disk_id, 0, name->st.st_ino);
+ SBVAL(io->generic.out.on_disk_id, 8, name->st.st_dev);
+ }
+
/* form the lock context used for byte range locking and
opendb locking */
status = pvfs_locking_key(name, f->handle, &f->handle->odb_locking_key);
@@ -1434,6 +1446,12 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs,
NT_STATUS_NOT_OK_RETURN(status);
}
+ if (io->generic.in.query_on_disk_id) {
+ ZERO_ARRAY(io->generic.out.on_disk_id);
+ SBVAL(io->generic.out.on_disk_id, 0, name->st.st_ino);
+ SBVAL(io->generic.out.on_disk_id, 8, name->st.st_dev);
+ }
+
status = ntvfs_handle_new(pvfs->ntvfs, req, &h);
NT_STATUS_NOT_OK_RETURN(status);