We used to store smbXsrv_tcon_global.tdb records in two steps, first we created a record in order to allocate the tcon id. The temporary record had a NULL share_name, which translated into 0 bytes for the string during ndr_push_smbXsrv_tcon_global0. The problem is that ndr_pull_smbXsrv_tcon_global0 fails on this with something like: Invalid record in smbXsrv_tcon_global.tdb:key '2CA0ED4A' ndr_pull_struct_blob(length=85) - Buffer Size Error The blob looks like this: [0000] 00 00 00 00 01 00 00 00 00 00 00 00 00 00 02 00 ........ ........ [0010] 00 00 00 00 4A ED A0 2C 4A ED A0 2C 00 00 00 00 ....J.., J..,.... [0020] F8 4B 00 00 00 00 00 00 00 00 00 00 FF FF FF FF .K...... ........ [0030] 4D 59 9B 9F 83 F4 35 20 36 D2 B0 82 62 68 D9 01 MY....5 6...bh.. [0040] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........ [0050] 00 00 00 00 00 .....
This bug was referenced in samba master: e0e58ed0e2429f01265d544b444bf0e4075549e2
Created attachment 17862 [details] Patch for v4-18-test
Created attachment 17863 [details] Patch for v4-17-test
Reassigning to Jule for inclusion in 4.17 and 4.18.
Pushed to autobuild-v4-{18,17}-test.
This bug was referenced in samba v4-17-test: 0c633912732292f114496773150727fcd39d6400
This bug was referenced in samba v4-18-test: 50d90531fae36f54c2d6a5e6cf1aba133473a29c
Closing out bug report. Thanks!
This bug was referenced in samba v4-18-stable (Release samba-4.18.2): 50d90531fae36f54c2d6a5e6cf1aba133473a29c
This bug was referenced in samba v4-17-stable (Release samba-4.17.8): 0c633912732292f114496773150727fcd39d6400