jborean93 / smbprotocol

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

additional_information in SMB2SetInfoRequest is set as enum despite Microsoft documentation stating it should support flags #152

Closed wokis closed 2 years ago

wokis commented 2 years ago

The additional_information field in SMB2SetInfoRequest (https://github.com/jborean93/smbprotocol/blob/master/smbprotocol/open.py#L1040) is defined as an EnumField despite Microsoft documentation ([MS-SMB2], section 2.2.39 SMB2 SET_INFO Request) stating that additional_information is a 4-byte bit field of flags.

For example, setting additional_information to OWNER_SECURTIY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION is currently impossible throwing an Enum value 7 does not exist in enum type exception.

jborean93 commented 2 years ago

Good pickup, feel free to send through a PR if not I’ll get around to it at some point in the next week.

jborean93 commented 2 years ago

Thanks for the fix!