Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use static directory under workdir for HTTP challenges #5428

Merged
merged 2 commits into from Jan 14, 2018
Merged

Conversation

joohoi
Copy link
Member

@joohoi joohoi commented Jan 14, 2018

Instead of using randomly generated temporary directory for HTTP challenge files, use a directory under Certbot work directory. This fixes issues with systemd PrivateTmp.

Fixes: #5427

Copy link
Member

@bmw bmw left a comment

Choose a reason for hiding this comment

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

Other than one small comment, LGTM.

with open(name, 'wb') as f:
f.write(validation.encode())
self.configurator.reverter.register_file_creation(True, name)
Copy link
Member

Choose a reason for hiding this comment

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

We should register the file with the reverter before creating it. While unlikely, if we get a signal/exception between writing the file and finishing registering it, it will never be deleted.

@bmw bmw added this to the 0.21.0 milestone Jan 14, 2018
@bmw bmw merged commit 60dd67a into master Jan 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP01 fails with default CentOS 7 config due to PrivateTmp
2 participants