Skip to content

Do not write and read rootcerts.crt at the same time#4758

Merged
rullzer merged 1 commit into
masterfrom
fix_3470
May 9, 2017
Merged

Do not write and read rootcerts.crt at the same time#4758
rullzer merged 1 commit into
masterfrom
fix_3470

Conversation

@rullzer

@rullzer rullzer commented May 9, 2017

Copy link
Copy Markdown
Member

(Possibly) fixes #3470

When updating the main file /files_external/rootcerts.crt we should not
read from /files_external/rootcerts.crt at the same time.

For 2 reasons: writing to a file and reading from it at the same time
can have non deterministic results

And we don't want all the certificates to appear 2 times in there.

This isn't caught by our standard file locking (that does not allow this
actually) because it is in a non locked path.... 🙈

I can't guarantee it fixes #3470 as I can't reproduce that locally. But I would not be surprised if this had something to do with it.

(Possibly) fixes #3470

When updating the main file /files_external/rootcerts.crt we should not
read from /files_external/rootcerts.crt at the same time.

For 2 reasons: writing to a file and reading from it at the same time
can have non deterministic results

And we don't want all the certificates to appear 2 times in there.

This isn't caught by our standard file locking (that does not allow this
actually) because it is in a non locked path....

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer added 3. to review Waiting for reviews bug high labels May 9, 2017
@rullzer rullzer added this to the Nextcloud 12.0 milestone May 9, 2017
@mention-bot

Copy link
Copy Markdown

@rullzer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @schiessle, @icewind1991 and @LukasReschke to be potential reviewers.

@icewind1991 icewind1991 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@rullzer rullzer merged commit b9bcc81 into master May 9, 2017
@rullzer rullzer deleted the fix_3470 branch May 9, 2017 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cURL error 77: error setting certificate verify locations: CAfile: /var/www/data/files_external/rootcerts.crt CApath: /etc/ssl/certs

4 participants