This trans2 subcommand (0x000D = CREATE_DIRECTORY) can contain optional EA data. Back in 3.0.20b the logic was changed from if (total_data) { do something with it } to fix bug #3212. However, the fix now means that a total_data of zero results in smbd returning "bad parameter" error to the client. To paraphrase 3.5.0rc3, or indeed anything post 3.0.20b, it now does if (total_data != 4) { if (total_data < 10) return error; do something with it } else { ignore it } in other words a total_data of 0 is now faulted, which is wrong. I think that just inverting the 'if' to say if ((total_data == 0) || (total_data == 4)) { ignore it } else { if (total_data < 10) return error; do something with it } would fix this.
What client are you using that can reproduce this ? I'm interested to know. Jeremy.
Created attachment 5495 [details] Patch for 3.5.x. Treats total_data consistently across trans2mkdir and trans2open - ignore total_data contents if total_data == 4, or 0. Make error processing regular. Please test and let me know if it fixes your issue. Jeremy.
(In reply to comment #1) > What client are you using that can reproduce this ? I'm interested to know. > Jeremy. The client is a BBC Master Microcomputer with ethernet upgrade - somewhat niche admittedly, the Trans2 packets are however correctly formed with a total_data of zero. The server reported as rejecting this was the smbd in Mac OS X Snow Leopard (3.0.25b derivative), whereas Mac OS X Tiger had previously worked fine.
(In reply to comment #2) > Treats total_data consistently across trans2mkdir and trans2open - ignore > total_data contents if total_data == 4, or 0. That patch fixes the problem - thanks! > Make error processing regular. I hadn't spotted that optimisation, nice.
Comment on attachment 5495 [details] Patch for 3.5.x. If you think this is worth it, re-assign to Karolin for 3.5.x. Otherwise it's in master and will be in 3.6.0. Jeremy.
Comment on attachment 5495 [details] Patch for 3.5.x. Karolin, please pick 704a607e3c3a5c3e727b386fab from master
Pushed, will be included in 3.5.4. Closing out bug report. Thanks!
Really closing out bug report now... ;-)