]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 4033: Rebuild corrupted ssl_db/size file
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 25 Nov 2014 16:46:38 +0000 (18:46 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 25 Nov 2014 16:46:38 +0000 (18:46 +0200)
commita066059b169b88031001c3e8244e46b3bd93417f
treea8d3b73ebc9c21875db9824d87be4f09e239a4a3
parent0673a6f44ca99c57c41e5b78e818f12cbed231f9
Bug 4033: Rebuild corrupted ssl_db/size file

The certificate db size file may become empty (for reasons beyond Squid
control such as server reboots, and possibly some unknown Squid bugs).
When it becomes empty, all ssl_crtd helpers (and then Squid) quit. This
change is required to make ssl_crtd more robust by recovering lost db
size information.

This patch:
 - Adds the "size" rebuild operation in CertificateDB and ssl_crtd
   daemon. Rebuild ssl_db/size file if it is empty:
     * Inside Ssl::CertificateDb::check method
     * When a CertificateDB operation try to read size from ssl_db/size file

 - If no fs_block_size parameter given for CertificateDB then consider a
   default value of 2048. Currently set to 0, which is may cause segfault to
   ssl_crtd daemon.

This is a Measurement Factory project
src/ssl/certificate_db.cc
src/ssl/certificate_db.h
src/ssl/ssl_crtd.cc