Improve ownership test in tails-debugging-info
Currently, we only print a warning if the file that is going to be
printed by tails-debugging-info is not owned by the user that was
We could improve it by:
- Also checking whether the file is a symlink that is not owned by the correct user
- Also check all the parent directories
See https://labs.riseup.net/code/issues/8514#note-58 for a proposed patch for the first point.
Additionally, since we ported tails-debugging-info to Python, we always
open the file to be printed as root, while before we opened it as the
user which is now configured in
We should fix that.
- Related to #8514 (closed)