]> git.ipfire.org Git - thirdparty/strongswan.git/commit
settings: Properly lock when extending sections or adding fallbacks
authorTobias Brunner <tobias@strongswan.org>
Tue, 22 May 2018 08:51:50 +0000 (10:51 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 27 Jun 2018 12:19:35 +0000 (14:19 +0200)
commit089d5f9765c88c95e588737ff902a59e3f186d3b
treedd6ed21ff2b5e9be95c18c060741338029412ceb
parentca3c7b7ea65f155451ad63315bb01080ffb880d2
settings: Properly lock when extending sections or adding fallbacks

There was a potential chance for a race condition if the ensured section
was purged for some reason before using it later.

This also changes the behavior for NULL/empty strings via load_string*
with merge == FALSE, which now purges the config/section.
src/libstrongswan/settings/settings.c
src/libstrongswan/tests/suites/test_settings.c