mirror of
https://github.com/samba-team/samba.git
synced 2025-01-29 21:47:30 +03:00
6f81f07303
If locking.tdb contains invalid records, "get_file_infos" called from directory enumeration crashes in Samba 4.4. The reason is that if "dbwrap_watched_parse" returns -1 due to record corruption, dbwrap_watched_parse_record returns NT_STATUS_OK without having called the parse function. Before 66cba9939b76f this led to "lck->data" to be uninitialized data, so smbd 4.4 would crash in this case. After 66cba9939b76f we implicitly initialize "state.lck" to NULL, so we don't have this particular problem anymore Apply the fix in master too, returning NT_STATUS_OK from parse_record without having called the parser could lead to bugs in other cases too. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>