diff options
author | ouyang.xu <ouyang.xu@test2.develop.cn> | 2016-07-11 18:12:52 +0800 |
---|---|---|
committer | Uri Simchoni <uri@samba.org> | 2016-08-19 09:35:14 +0200 |
commit | 98ea4a2219c4ff1c1a8307f64a7588845be7af6f (patch) | |
tree | adf451118e2e9b21790cedfda39f29996a2c1149 /source4/ntvfs | |
parent | 23b4fb681aa7c02450d0ebb06af87943163b959b (diff) | |
download | samba-98ea4a2219c4ff1c1a8307f64a7588845be7af6f.tar.gz |
pvfs_open win10 fix, need return SMB2_CREATE_TAG_QFID
Signed-off-by: kkhaike <kkhaike@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Fri Aug 19 09:35:15 CEST 2016 on sn-devel-144
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/ntvfs_generic.c | 3 | ||||
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 18 |
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); |