Bug 13535 - Durable Handle reconnect fails in smbd_smb2_create_durable_lease_check()
Summary: Durable Handle reconnect fails in smbd_smb2_create_durable_lease_check()
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-17 13:39 UTC by Ralph Böhme
Modified: 2018-08-14 11:08 UTC (History)
2 users (show)

See Also:


Attachments
Patch for 4.7, 4.8 and 4.9 cherry-picked from master (4.29 KB, patch)
2018-07-18 09:14 UTC, Ralph Böhme
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2018-07-17 13:39:51 UTC
If a client tries to reconnect a handle that has a Durable Handle v2 and a handle lease, when reconnecting in DH2C the server calls smbd_smb2_create_durable_lease_check() as part of the handle checks.

There a strcmp is done between the path on the reconnected fsp and the on-the-wire SMB2 path. The former will be "foo/bar" while the latter will be "foo\\bar", so the check fails:

[10 2018/07/17 12:46:04.907479 ../source3/smbd/smb2_create.c:423 smbd_smb2_create_durable_lease_check]
  Lease requested for file dir\bigfile, reopened file is named dir/bigfile

Have patch, need bugnubmer...
Comment 1 Ralph Böhme 2018-07-18 09:14:37 UTC
Created attachment 14326 [details]
Patch for 4.7, 4.8 and 4.9 cherry-picked from master
Comment 2 Jeremy Allison 2018-07-18 23:08:39 UTC
Reassigning to Karolin for inclusion in 4.9.0rcNExt, 4.8.next, 4.7.next.
Comment 3 Karolin Seeger 2018-07-28 04:11:23 UTC
(In reply to Jeremy Allison from comment #2)
Pushed to autobuild-v4-{9,8,7}-test.
Comment 4 Karolin Seeger 2018-08-14 11:08:08 UTC
(In reply to Karolin Seeger from comment #3)
Pushed to all branches.
Closing out bug report.

Thanks!