sahlberg / libsmb2

SMB2/3 userspace client
Other
322 stars 135 forks source link

Does libsmb2 support FSCTL_PIPE_TRANSCEIVE #268

Closed xspeed1989 closed 1 year ago

xspeed1989 commented 1 year ago

I call REnumServicesStatusExW, request as below image

response:

image

windows doesn't replay full data, But I use WINAPI, it works, It will recives data one more time after FSCTL_PIPE_TRANSCEIVE

I found windows api will send some data like this image

xspeed1989 commented 1 year ago

@sahlberg I found the issue. It seems to be that libsmb2 doesn't deal with alloc hint, I found libsmb2 set lenght to 65535,but huge data need recv more times. image

I think correctly code should like pseudocode as blow:

if(SMB2.NTSTATUS ==NT Status: STATUS_BUFFER_OVERFLOW (0x80000005) ||  alloc_hint != logic_recived_data_len )
    request_read()