jborean93 / smbprotocol

Python SMBv2 and v3 Client
MIT License
309 stars 72 forks source link

More advanced DFS compatibility checks #253

Closed jborean93 closed 6 months ago

jborean93 commented 7 months ago

Avoid setting the SMB2_FLAGS_DFS_OPERATIONS flag in the SMB header if the server did not report it as supporting DFS operations during the negotiation phase. This should hopefully fix up some problems when the server errors in the case it doesn't support DFS operations.

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

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (37512ee) 99.06% compared to head (0607a20) 99.06%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #253 +/- ## ======================================= Coverage 99.06% 99.06% ======================================= Files 24 24 Lines 5112 5112 ======================================= Hits 5064 5064 Misses 48 48 ``` | [Flag](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `99.06% <100.00%> (ø)` | | | [py3.10](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `99.02% <100.00%> (ø)` | | | [py3.11](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `99.02% <100.00%> (ø)` | | | [py3.12](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `99.02% <100.00%> (ø)` | | | [py3.7](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `99.01% <100.00%> (ø)` | | | [py3.8](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `99.02% <100.00%> (ø)` | | | [py3.9](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `99.05% <100.00%> (ø)` | | | [x64](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `99.06% <100.00%> (ø)` | | | [x86](https://app.codecov.io/gh/jborean93/smbprotocol/pull/253/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `98.98% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jborean93 commented 6 months ago

This didn't help