certbot/certbot-apache
Adrien Ferrand ab76834100 [Windows|Linux] Forbid os.stat and os.fstat (#7325)
Fixes #7212

This PR forbid os.stat and os.fstat, and fix or provide alternatives to avoid its usage in certbot outside of certbot.compat.filesystem.

* Reimplement private key mode propagation

* Remove other os.stat

* Remove last call of os.stat in certbot package

* Forbid stat and fstat

* Implement mode comparison checks

* Add unit tests

* Update certbot/compat/filesystem.py

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update certbot/compat/filesystem.py

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Handle case where multiple ace concerns a given SID in has_min_permissions

* Add a new test scenario

* Add a simple test for has_same_ownership

* Fix name function

* Add a comment explaining an ACE structure

* Move a test in its dedicated class

* Improve a message error

* Calculate has_min_permission result using effective permission rights to be more generic.

* Change an exception message

* Add comments, avoid to skip a test.

* Update certbot/compat/filesystem.py

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
2019-09-06 14:30:25 -07:00
..
certbot_apache [Windows|Linux] Forbid os.stat and os.fstat (#7325) 2019-09-06 14:30:25 -07:00
docs [Windows] Security model for files permissions - STEP 2 (#6895) 2019-04-12 13:32:51 -07:00
LICENSE.txt s/letsencrypt/certbot letsencrypt-apache 2016-04-13 16:30:57 -07:00
local-oldest-requirements.txt [Windows|Linux] Forbid os.stat and os.fstat (#7325) 2019-09-06 14:30:25 -07:00
MANIFEST.in Revert disabling TLS session tickets in Apache (#7315) 2019-08-08 16:23:37 -07:00
README.rst s/Let's Encrypt/Certbot certbot-apache 2016-04-13 16:36:53 -07:00
readthedocs.org.requirements.txt s/letsencrypt/certbot letsencrypt-apache 2016-04-13 16:30:57 -07:00
setup.cfg Tell the world we're Python 3 compatible (#4568) 2017-04-28 16:06:45 -07:00
setup.py [Windows|Linux] Forbid os.stat and os.fstat (#7325) 2019-09-06 14:30:25 -07:00

Apache plugin for Certbot