summaryrefslogtreecommitdiff
path: root/install_with_python.sh
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-05-22 16:38:08 +1200
committerKarolin Seeger <kseeger@samba.org>2019-08-28 07:36:29 +0000
commit3cb3b34def330b57b008a02c027d8ea658ae487c (patch)
tree12842fb57e478ccf43e9e82c055b5e501863a6b5 /install_with_python.sh
parent3e9e7afc2599cd95d2b7b374575bb4b20fa1c060 (diff)
downloadsamba-3cb3b34def330b57b008a02c027d8ea658ae487c.tar.gz
ldb: Fix segfault parsing new pack formats
We need to check for the errors given by ldb_unpack() et al by preserving the error code from kv_ctx->parser() called by tdb_parse_record() in ltdb_parse_record(). Otherwise we will silently accept corrupt records and segfault later. Likewise new pack formats will confuse the parser but not be detected except by the incomplete struct ldb_message. With this patch, the user will see a message like: Invalid data for index DN=@BASEINFO Failed to connect to 'st/ad_dc/private/sam.ldb' with backend 'tdb': Unable to load ltdb cache records for backend 'ldb_tdb backend' Failed to connect to st/ad_dc/private/sam.ldb - Unable to load ltdb cache records for backend 'ldb_tdb backend' This can be refined in the future by a specific check for pack format versions in a higher caller, but this much is needed regardless to detect corrupt records. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13959 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> (cherry picked from commit a3101b9704f554a350493553336cbbbd7d4ae02e)
Diffstat (limited to 'install_with_python.sh')
0 files changed, 0 insertions, 0 deletions