-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cockpit: retain SELinux context if file exists #21506
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this!
For the Cockpit Files editor fsreplace1 is used to write new content to an existing file. If an administrator has set a custom selinux context to such a file, for example a config file shared into a container the SELinux context is not kept which leads to unexpected behaviour. Closes: cockpit-project#21505
497c01f
to
9c2f2db
Compare
file.replace(content, use_tag ? tag : undefined) | ||
.catch(exc => { | ||
fsreplace_error.textContent = exc.toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 3 added lines are not executed by any test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dankjewel!
a-webui looks really messy. Two tests are known broken, but not that badly. So let's retry to be sure. The failures are all on ND@1, so this reeks of "VM corruption". |
For the Cockpit Files editor fsreplace1 is used to write new content to an existing file. If an administrator has set a custom selinux context to such a file, for example a config file shared into a container the SELinux context is not kept which leads to unexpected behaviour.
Closes: #21505