mirror of
https://github.com/certbot/certbot.git
synced 2026-07-31 18:25:24 +02:00
[Windows] Security model for files permissions - STEP 3d (#6968)
* Implement security.mkdir and security.makedirs * Fix lint * Correct mock * Rename security into filesystem * Update apache and nginx plugins requirements * Update certbot/plugins/webroot.py Co-Authored-By: ohemorange <ebportnoy@gmail.com> * Reenable pylint here * Move code * Reimplement mkdir * Control errors on eexist, remove superfluous chmod for makedirs * Add proper skip for windows only tests * Fix lint * Fix mypy * Clean code * Adapt coverage threshold on Linux with addition of LOC specific to Windows * Add forbiden functions to tests * Update certbot/compat/os.py Co-Authored-By: ohemorange <ebportnoy@gmail.com> * Simplify code * Sync _get_current_user with part3c * Use the simpliest implementation * Remove exist_ok, simplify code. * Simplify inline comment * Update filesystem_test.py * Update certbot/compat/os.py Co-Authored-By: ohemorange <ebportnoy@gmail.com> * Update certbot/plugins/webroot.py Co-Authored-By: ohemorange <ebportnoy@gmail.com> * Update certbot/plugins/webroot.py Co-Authored-By: ohemorange <ebportnoy@gmail.com> * Add a test to check we set back os.mkdir correctly after filesystem.makedirs is called. * Fix lint, adapt coverage
This commit is contained in:
committed by
ohemorange
co-authored by
ohemorange
parent
20b595bc9e
commit
7d61e9ea56
+2
-1
@@ -21,6 +21,7 @@ from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
|
||||
from certbot import lock
|
||||
from certbot import util
|
||||
from certbot.compat import filesystem
|
||||
|
||||
from certbot.tests import util as test_util
|
||||
|
||||
@@ -92,7 +93,7 @@ def set_up_dirs():
|
||||
nginx_dir = os.path.join(temp_dir, 'nginx')
|
||||
|
||||
for directory in (config_dir, logs_dir, work_dir, nginx_dir,):
|
||||
os.mkdir(directory)
|
||||
filesystem.mkdir(directory)
|
||||
|
||||
test_util.make_lineage(config_dir, 'sample-renewal.conf')
|
||||
set_up_nginx_dir(nginx_dir)
|
||||
|
||||
Reference in New Issue
Block a user