Commit 81345d12 authored by segfault's avatar segfault
Browse files

Do not open files as another user in tails-debugging-info.py

The script is called as root anyway, so we don't have to use sudo to
read files.
parent b499ffa1
......@@ -105,8 +105,8 @@ def debug_file(user, filename):
if os.path.exists(filename):
print()
print('===== content of {} ====='.format(filename))
content = sh.sudo('-u', user, 'cat', filename).stdout.decode()
print(content)
with open(filename) as f:
print(f.read())
def debug_directory(user, dir_name):
if not os.path.isdir(dir_name):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment