From 9d30bb132acac90bf31842fff3bdf8f28af0c791 Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Thu, 21 Jul 2016 23:16:39 +0200 Subject: [PATCH] Fix umask --- qubes/storage/__init__.py | 2 +- qubes/storage/file.py | 2 +- qubes/vm/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qubes/storage/__init__.py b/qubes/storage/__init__.py index dcdc32ff..0af1ad27 100644 --- a/qubes/storage/__init__.py +++ b/qubes/storage/__init__.py @@ -310,7 +310,7 @@ class Storage(object): def create(self): ''' Creates volumes on disk ''' - old_umask = os.umask(002) + old_umask = os.umask(0o002) for volume in self.vm.volumes.values(): self.get_pool(volume).create(volume) diff --git a/qubes/storage/file.py b/qubes/storage/file.py index 3f899f90..62b813c9 100644 --- a/qubes/storage/file.py +++ b/qubes/storage/file.py @@ -186,7 +186,7 @@ class FilePool(qubes.storage.Pool): old_path = volume.path_cow + '.old' os.rename(volume.path_cow, old_path) - old_umask = os.umask(002) + old_umask = os.umask(0o002) with open(volume.path_cow, 'w') as f_cow: f_cow.truncate(volume.size) os.umask(old_umask) diff --git a/qubes/vm/__init__.py b/qubes/vm/__init__.py index 7ccf4c9f..673eef2f 100644 --- a/qubes/vm/__init__.py +++ b/qubes/vm/__init__.py @@ -325,7 +325,7 @@ class BaseVM(qubes.PropertyHolder): tree = lxml.etree.ElementTree(root) try: - old_umask = os.umask(002) + old_umask = os.umask(0o002) with open(os.path.join(self.dir_path, self.firewall_conf), 'w') as fd: tree.write(fd, encoding="UTF-8", pretty_print=True)