diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-06-13 12:13:01 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-06-14 22:04:10 +0200 |
commit | 3f110e50bfdbaf6958c12098e06ef599341d7e3b (patch) | |
tree | 7c036e9a07bf555559418269de9e49dc1273f0c1 /source3/smbd/smb2_break.c | |
parent | 47f837c105ee7b70b7e80e41772b7c9470bbe153 (diff) | |
download | samba-3f110e50bfdbaf6958c12098e06ef599341d7e3b.tar.gz samba-3f110e50bfdbaf6958c12098e06ef599341d7e3b.tar.bz2 samba-3f110e50bfdbaf6958c12098e06ef599341d7e3b.zip |
s3:smbd: use fsp_persistent_id() as persistent_file_id part for SMB2 (bug #8995)
It seems to be important to have unique persistent file ids,
because windows clients seem to index files by server_guid + persistent_file_id.
Which may break, if we just have a 16-bit range per connection
and the client connects multiple times.
Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent
fileid in SMB2.
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 14 22:04:13 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd/smb2_break.c')
-rw-r--r-- | source3/smbd/smb2_break.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c index 75505e5ab8..9318068699 100644 --- a/source3/smbd/smb2_break.c +++ b/source3/smbd/smb2_break.c @@ -237,6 +237,7 @@ void send_break_message_smb2(files_struct *fsp, int level) SMB2_OPLOCK_LEVEL_II : SMB2_OPLOCK_LEVEL_NONE; NTSTATUS status; + uint64_t fsp_persistent = fsp_persistent_id(fsp); DEBUG(10,("send_break_message_smb2: sending oplock break " "for file %s, fnum = %d, smb2 level %u\n", @@ -245,7 +246,7 @@ void send_break_message_smb2(files_struct *fsp, int level) (unsigned int)smb2_oplock_level )); status = smbd_smb2_send_oplock_break(fsp->conn->sconn, - (uint64_t)fsp->fnum, + fsp_persistent, (uint64_t)fsp->fnum, smb2_oplock_level); if (!NT_STATUS_IS_OK(status)) { |