Separate whitelist entries with spaces instead of newlines.

This commit is contained in:
WillyPillow 2020-06-30 12:08:16 +08:00
parent 9d9ee6a4b7
commit 6c7360f25c

View File

@ -155,16 +155,19 @@ def import_appmenus(vm, source_dir):
else:
cmd_prefix = []
# store the whitelists in VM features
# separated by spaces should be ok as there should be no spaces in the file
# name according to the FreeDesktop spec
with open(os.path.join(source_dir, 'vm-whitelisted-appmenus.list'), 'r') \
as f:
vm.features['default-whitelist'] = f.read()
vm.features['default-whitelist'] = ' '.join([x.rstrip() for x in f])
with open(os.path.join(source_dir, 'whitelisted-appmenus.list'), 'r') \
as f:
vm.features['whitelist'] = f.read()
vm.features['whitelist'] = ' '.join([x.rstrip() for x in f])
with open(
os.path.join(source_dir, 'netvm-whitelisted-appmenus.list'), 'r') \
as f:
vm.features['netvm-whitelist'] = f.read()
vm.features['netvm-whitelist'] = ' '.join([x.rstrip() for x in f])
# TODO: change this to qrexec calls to GUI VM, when GUI VM will be
# implemented