Fix umask
This commit is contained in:
parent
897a1de14f
commit
9d30bb132a
@ -310,7 +310,7 @@ class Storage(object):
|
|||||||
|
|
||||||
def create(self):
|
def create(self):
|
||||||
''' Creates volumes on disk '''
|
''' Creates volumes on disk '''
|
||||||
old_umask = os.umask(002)
|
old_umask = os.umask(0o002)
|
||||||
|
|
||||||
for volume in self.vm.volumes.values():
|
for volume in self.vm.volumes.values():
|
||||||
self.get_pool(volume).create(volume)
|
self.get_pool(volume).create(volume)
|
||||||
|
@ -186,7 +186,7 @@ class FilePool(qubes.storage.Pool):
|
|||||||
old_path = volume.path_cow + '.old'
|
old_path = volume.path_cow + '.old'
|
||||||
os.rename(volume.path_cow, old_path)
|
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:
|
with open(volume.path_cow, 'w') as f_cow:
|
||||||
f_cow.truncate(volume.size)
|
f_cow.truncate(volume.size)
|
||||||
os.umask(old_umask)
|
os.umask(old_umask)
|
||||||
|
@ -325,7 +325,7 @@ class BaseVM(qubes.PropertyHolder):
|
|||||||
tree = lxml.etree.ElementTree(root)
|
tree = lxml.etree.ElementTree(root)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
old_umask = os.umask(002)
|
old_umask = os.umask(0o002)
|
||||||
with open(os.path.join(self.dir_path,
|
with open(os.path.join(self.dir_path,
|
||||||
self.firewall_conf), 'w') as fd:
|
self.firewall_conf), 'w') as fd:
|
||||||
tree.write(fd, encoding="UTF-8", pretty_print=True)
|
tree.write(fd, encoding="UTF-8", pretty_print=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user