From 54b87d8f2fa8bd4258267c0fbf1847ab47ef24df Mon Sep 17 00:00:00 2001 From: ahaw021 Date: Fri, 21 Jul 2017 16:08:35 +0800 Subject: [PATCH] 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 --- certbot/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/certbot/account.py b/certbot/account.py index 389f96791..fd7258de3 100644 --- a/certbot/account.py +++ b/certbot/account.py @@ -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: