mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
committed by
Brad Warren
parent
f755cfef48
commit
ec3ec9068c
@@ -546,13 +546,7 @@ def _generate_windows_flags(rights_desc):
|
|||||||
if rights_desc['write']:
|
if rights_desc['write']:
|
||||||
flag = flag | (ntsecuritycon.FILE_ALL_ACCESS
|
flag = flag | (ntsecuritycon.FILE_ALL_ACCESS
|
||||||
^ ntsecuritycon.FILE_GENERIC_READ
|
^ ntsecuritycon.FILE_GENERIC_READ
|
||||||
^ ntsecuritycon.FILE_GENERIC_EXECUTE
|
^ ntsecuritycon.FILE_GENERIC_EXECUTE)
|
||||||
# Despite bit `512` being present in ntsecuritycon.FILE_ALL_ACCESS, it is
|
|
||||||
# not effectively applied to the file or the directory.
|
|
||||||
# As _generate_windows_flags is also used to compare two dacls, we remove
|
|
||||||
# it right now to have flags that contain only the bits effectively applied
|
|
||||||
# by Windows.
|
|
||||||
^ 512)
|
|
||||||
if rights_desc['execute']:
|
if rights_desc['execute']:
|
||||||
flag = flag | ntsecuritycon.FILE_GENERIC_EXECUTE
|
flag = flag | ntsecuritycon.FILE_GENERIC_EXECUTE
|
||||||
|
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ class WindowsChmodTests(TempDirTestCase):
|
|||||||
self.assertEqual(len(system_aces), 1)
|
self.assertEqual(len(system_aces), 1)
|
||||||
self.assertEqual(len(admin_aces), 1)
|
self.assertEqual(len(admin_aces), 1)
|
||||||
|
|
||||||
self.assertEqual(system_aces[0][1], ntsecuritycon.FILE_ALL_ACCESS ^ 512)
|
self.assertEqual(system_aces[0][1], ntsecuritycon.FILE_ALL_ACCESS)
|
||||||
self.assertEqual(admin_aces[0][1], ntsecuritycon.FILE_ALL_ACCESS ^ 512)
|
self.assertEqual(admin_aces[0][1], ntsecuritycon.FILE_ALL_ACCESS)
|
||||||
|
|
||||||
def test_read_flag(self):
|
def test_read_flag(self):
|
||||||
self._test_flag(4, ntsecuritycon.FILE_GENERIC_READ)
|
self._test_flag(4, ntsecuritycon.FILE_GENERIC_READ)
|
||||||
@@ -101,12 +101,10 @@ class WindowsChmodTests(TempDirTestCase):
|
|||||||
def test_write_flag(self):
|
def test_write_flag(self):
|
||||||
self._test_flag(2, (ntsecuritycon.FILE_ALL_ACCESS
|
self._test_flag(2, (ntsecuritycon.FILE_ALL_ACCESS
|
||||||
^ ntsecuritycon.FILE_GENERIC_READ
|
^ ntsecuritycon.FILE_GENERIC_READ
|
||||||
^ ntsecuritycon.FILE_GENERIC_EXECUTE
|
^ ntsecuritycon.FILE_GENERIC_EXECUTE))
|
||||||
^ 512))
|
|
||||||
|
|
||||||
def test_full_flag(self):
|
def test_full_flag(self):
|
||||||
self._test_flag(7, (ntsecuritycon.FILE_ALL_ACCESS
|
self._test_flag(7, ntsecuritycon.FILE_ALL_ACCESS)
|
||||||
^ 512))
|
|
||||||
|
|
||||||
def _test_flag(self, everyone_mode, windows_flag):
|
def _test_flag(self, everyone_mode, windows_flag):
|
||||||
# Note that flag is tested against `everyone`, not `user`, because practically these unit
|
# Note that flag is tested against `everyone`, not `user`, because practically these unit
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ install_requires = [
|
|||||||
# However environment markers are supported only with setuptools >= 36.2.
|
# However environment markers are supported only with setuptools >= 36.2.
|
||||||
# So this dependency is not added for old Linux distributions with old setuptools,
|
# So this dependency is not added for old Linux distributions with old setuptools,
|
||||||
# in order to allow these systems to build certbot from sources.
|
# in order to allow these systems to build certbot from sources.
|
||||||
pywin32_req = 'pywin32>=224'
|
pywin32_req = 'pywin32>=225'
|
||||||
if StrictVersion(setuptools_version) >= StrictVersion('36.2'):
|
if StrictVersion(setuptools_version) >= StrictVersion('36.2'):
|
||||||
install_requires.append(pywin32_req + " ; sys_platform == 'win32'")
|
install_requires.append(pywin32_req + " ; sys_platform == 'win32'")
|
||||||
elif 'bdist_wheel' in sys.argv[1:]:
|
elif 'bdist_wheel' in sys.argv[1:]:
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ pytest-sugar==0.9.2
|
|||||||
pytest-rerunfailures==4.2
|
pytest-rerunfailures==4.2
|
||||||
python-dateutil==2.6.1
|
python-dateutil==2.6.1
|
||||||
python-digitalocean==1.11
|
python-digitalocean==1.11
|
||||||
pywin32==224
|
pywin32==225
|
||||||
PyYAML==3.13
|
PyYAML==3.13
|
||||||
repoze.sphinx.autointerface==0.8
|
repoze.sphinx.autointerface==0.8
|
||||||
requests-file==1.4.2
|
requests-file==1.4.2
|
||||||
|
|||||||
Reference in New Issue
Block a user