reverter.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:15:38 +08:00 committed by GitHub
parent 3958a5167c
commit 71b6e1cd51

View file

@ -65,7 +65,7 @@ class Reverter(object):
self.config = config
util.make_or_verify_dir(
config.backup_dir, constants.CONFIG_DIRS_MODE, os.geteuid(),
config.backup_dir, constants.CONFIG_DIRS_MODE,
self.config.strict_permissions)
def revert_temporary_config(self):
@ -217,7 +217,7 @@ class Reverter(object):
"""
util.make_or_verify_dir(
cp_dir, constants.CONFIG_DIRS_MODE, os.geteuid(),
cp_dir, constants.CONFIG_DIRS_MODE,
self.config.strict_permissions)
op_fd, existing_filepaths = self._read_and_append(
@ -431,7 +431,7 @@ class Reverter(object):
cp_dir = self.config.in_progress_dir
util.make_or_verify_dir(
cp_dir, constants.CONFIG_DIRS_MODE, os.geteuid(),
cp_dir, constants.CONFIG_DIRS_MODE,
self.config.strict_permissions)
return cp_dir