jborean93 / smbprotocol

Python SMBv2 and v3 Client
MIT License
316 stars 73 forks source link

Fix up session id lookup issues with ksmbd #224

Closed jborean93 closed 1 year ago

jborean93 commented 1 year ago

The Linux ksmbd module is slightly different in how it returns the session id. This PR fixes up the logic to handle this new workflow as well as simplfiy the existing one.

Fixes: https://github.com/jborean93/smbprotocol/issues/215

codecov[bot] commented 1 year ago

Codecov Report

Merging #224 (a2bfffa) into master (f7eca41) will decrease coverage by 2.38%. The diff coverage is 100.00%.

:exclamation: Current head a2bfffa differs from pull request most recent head 4182e76. Consider uploading reports for the commit 4182e76 to get more accurate results

@@            Coverage Diff             @@
##           master     #224      +/-   ##
==========================================
- Coverage   99.07%   96.70%   -2.38%     
==========================================
  Files          24       24              
  Lines        5081     5034      -47     
==========================================
- Hits         5034     4868     -166     
- Misses         47      166     +119     
Flag Coverage Δ
96.70% <100.00%> (-2.38%) :arrow_down:
py3.10 ?
py3.11 ?
py3.7 96.70% <100.00%> (-2.34%) :arrow_down:
py3.8 ?
py3.9 ?
x64 ?
x86 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/smbprotocol/connection.py 94.15% <100.00%> (-5.70%) :arrow_down:
src/smbprotocol/session.py 95.20% <100.00%> (+0.02%) :arrow_up:

... and 13 files with indirect coverage changes