Windows seems to track share permission changes and modify existing connections accordingly. We need to do the same.
Created attachment 4415 [details]
Initial patch from Boyang to add this functionality.
Created attachment 4419 [details]
packet trace. :-)
The tid 0x0040 is always there if user has some kind of access right. this is from write to read change. I cannot see another tconx to share usershare.
Please correct me if I am wrong.
Hmmm. What I would like to see is a torture test that opens a file r/w, does a write, opens a second connection and changes the share secdesc, then proves the existing file handle is changed by trying another write, then getting refused. To be honest, I still don't really believe this happens. A torture test that can easily be run would certainly be very convincing.
Created attachment 4433 [details]
improved patch to use poll-style check. unfinished, under reviewing.. :-)
Bo, any updates on the torture test I asked for?
Too late for enhancements in 3.5. Raising version.