qubes-fs-tree-check: Detect if a directory is unsafe for display#534
qubes-fs-tree-check: Detect if a directory is unsafe for display#534marmarek merged 2 commits intoQubesOS:mainfrom
Conversation
This improves UX.
When processing directories, process_dirent() detected filenames that are unsafe for display and set "bad" to true, but "bad" was not used to determine the return value of process_dirent(). Instead, the function tail-called simple_fs_walk(). Therefore, directories with unsafe filenames were not detected. This caused qubes.Filecopy to be used instead of qubes.Filecopy+allow-all-names. qubes.Filecopy (correctly) rejects the directory. Fix the bug by ensuring that if bad is set to true, process_dirent() returns true even if the function recurses into simple_fs_walk(). This will cause qubes.Filecopy+allow-all-names to be used, which will accept the directory and allow the copy to succeed. Fixes: QubesOS/qubes-issues#9567
|
PipelineRetryFailed |
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024111418-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024091704-4.3&flavor=update
Failed tests5 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/112766#dependencies 201 fixed
Unstable testsDetails
|
When processing directories,
process_dirent()detected filenames that are unsafe for display and setbadto true, butbadwas not used to determine the return value ofprocess_dirent(). Instead, the function tail-calledsimple_fs_walk(). Therefore, directories with unsafe filenames were not detected. This causedqubes.Filecopyto be used instead ofqubes.Filecopy+allow-all-names.qubes.Filecopy(correctly) rejects the directory.Fix the bug by ensuring that if
badis set to true,process_dirent()returns true even if the function recurses intosimple_fs_walk(). This will causequbes.Filecopy+allow-all-namesto be used, which will accept the directory and allow the copy to succeed.Fixes: QubesOS/qubes-issues#9567