Skip to content

Commit

Permalink
Merge pull request #1547 from JerAxxxxxxx/smb2_set_info
Browse files Browse the repository at this point in the history
Impacket #1434: Added `SMB2_FILE_ALLOCATION_INFO` type determination, referenced Samba code
  • Loading branch information
alexisbalbachan committed Jun 27, 2023
2 parents 4888172 + 74ac373 commit 1df3490
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions impacket/smbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3476,6 +3476,10 @@ def smb2SetInfo(connId, smbServer, recvPacket):
except Exception as e:
smbServer.log("smb2SetInfo: %s" % e, logging.ERROR)
errorCode = STATUS_ACCESS_DENIED
elif informationLevel == smb2.SMB2_FILE_ALLOCATION_INFO:
# See https://github.com/samba-team/samba/blob/master/source3/smbd/smb2_trans2.c#LL5201C8-L5201C39
smbServer.log("Warning: SMB2_FILE_ALLOCATION_INFO not implemented")
errorCode = STATUS_SUCCESS
else:
smbServer.log('Unknown level for set file info! 0x%x' % informationLevel, logging.ERROR)
# UNSUPPORTED
Expand Down

0 comments on commit 1df3490

Please sign in to comment.