]> git.ipfire.org Git - thirdparty/squid.git/commit
Bug 4033: Rebuild corrupted ssl_db/size file
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 3 Dec 2014 11:58:37 +0000 (03:58 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 3 Dec 2014 11:58:37 +0000 (03:58 -0800)
commitfc14f94b58f652174b639614f25b8ccd45d33d64
tree354b896fbfa0de181f4ef0509b43d99b8eef8b62
parentde87c736f6ff7d3b3e218d07cf1848785a26c2b9
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