Fix umask

This commit is contained in:
Bahtiar `kalkin-` Gadimov 2016-07-21 23:16:39 +02:00
parent 897a1de14f
commit 9d30bb132a
No known key found for this signature in database
GPG Key ID: 96ED3C3BA19C3DEE
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)