-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can only access some folders on my linux server #7
Comments
Hi qiulang, Can you boil the problem down to some specific file? Thanks, |
Hi, some further information. Second, the length of file name seems to cause the problem as well. If the name is more than 11 letters, I will got the error, e.g. "expect54500" is ok but "expect545000" is not. But again the weird thing is that I changed the folder name to "expect", I got the error; if it is "expect5", I can list folder again. I open the VERY_VERBOSE macro, if you need I can attached the log. |
Hi, I seem to find the pattern of the failed file name! It seems that if the name's length is an odd number the access will succeed; but if the length is an even number the access will fail! |
Hi I found a way to fix the problem although I don’t know the root cause of the problem! So as I found current codes only work for the folder whose name’s length is odd number. Then I further found that it may be because for even number folder name, the data size we set in _tango_TRANS2_FIND_FIRST2 is incorrect! Say I have a folder called “abc” and another folder called “abcd”, when I turn on the macro VERY_VERBOSE I find that they both print out log “Bytes to send (including nbt-header!): 89″, apparently for “abcd” folder the bytes to send should be 90. So I add this line to correct data size and codes work now! if (data_offset % 2 == 0) _tango_smb_setDataSize(smb, data_offset+1); But I examine your code carefully and can’t find out why we need to +1 for even number. So any idea? |
the "specification" is rather unclear on where paddings are required. As you see, i also do some paddings to word boundaries for the trans2_find_first SMB. So, in general it is not surprising that for folder names with length x and length x+1 bytes, actually a message with the same size is sent out. The only way to really find out about what is "right" or "wrong" is comparing with what over cifs clients send. So, if your fix works, it might as well be that i am missing some padding somewhere. I will have a check on this once i have access to a windows or samba server for testing again. |
Great work man!!! I followed the fix from qiulang and everything is working amazingly! Now if you could make it to talk to MTLM2 then it is perfect. |
Hi I hit this weird error on my linux server(using samba service of course) that I can access some directories under the same directory while others gave me the error message, "_tango_evaluate_response_header(): NT_STATUS Level is 0003 with value 000d." Can you take a look ? Thanks!
_tango_send(): Bytes to send (including nbt-header!): 95
_tango_send(): Sent 95 bytes.
_tango_send_and_receive(): Received 4 bytes.
_tango_send_and_receive(): Received 35 bytes.
_tango_TRANS2_FIND_FIRST2(): Received response
_tango_evaluate_response_header(): NT_STATUS Level is 0003 with value 000d.
The text was updated successfully, but these errors were encountered: