Skip to content
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

Don't crash on special files #510

Merged

Conversation

allisonkarlitskaya
Copy link
Member

Fixes a bug introduced in e166476.

The file category is only present on regular files, but we access it unconditionally on anything that isn't a directory. That causes crashes when entering /dev or anywhere else that contains devices, sockets, or FIFOs.

Make the access conditional and add a test for entering /dev.

Fixes #507

Fixes a bug introduced in e166476.

The file category is only present on regular files, but we access it
unconditionally on anything that isn't a directory.  That causes crashes
when entering /dev or anywhere else that contains devices, sockets, or
FIFOs.

Make the access conditional and add a test for entering /dev.

Fixes cockpit-project#507
@allisonkarlitskaya allisonkarlitskaya requested a review from jelly June 5, 2024 15:34
@allisonkarlitskaya allisonkarlitskaya merged commit f0c6e36 into cockpit-project:main Jun 5, 2024
14 checks passed
@allisonkarlitskaya allisonkarlitskaya deleted the category-special branch June 19, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browsing to the /tmp directory results in a crash
2 participants