account.py - Windows Compatibility Mode - os.geteuid()

Removed the need for UID in methods. They are no longer passed a specific UID rather use the global UID in util

As all functions in other classes (e.g. Accounts, crypto_util.py) etc call os.geteuid() this should work
This commit is contained in:
ahaw021 2017-07-21 16:08:35 +08:00 committed by GitHub
parent 325189a421
commit 54b87d8f2f

View file

@ -138,7 +138,7 @@ class AccountFileStorage(interfaces.AccountStorage):
"""
def __init__(self, config):
self.config = config
util.make_or_verify_dir(config.accounts_dir, 0o700, os.geteuid(),
util.make_or_verify_dir(config.accounts_dir, 0o700,
self.config.strict_permissions)
def _account_dir_path(self, account_id):
@ -218,7 +218,7 @@ class AccountFileStorage(interfaces.AccountStorage):
def _save(self, account, acme, regr_only):
account_dir_path = self._account_dir_path(account.id)
util.make_or_verify_dir(account_dir_path, 0o700, os.geteuid(),
util.make_or_verify_dir(account_dir_path, 0o700,
self.config.strict_permissions)
try:
with open(self._regr_path(account_dir_path), "w") as regr_file: