socket-util: fix getpeergroups() assert(fd)#8080
Merged
yuwata merged 1 commit intosystemd:masterfrom Feb 3, 2018
Merged
Conversation
Don't assert on zero-value fds.
Member
|
lgtm. |
aughr
pushed a commit
to aughr/systemd
that referenced
this pull request
Apr 10, 2018
Don't assert on zero-value fds. Fixes systemd#8075.
afayaz-feral
pushed a commit
to FeralInteractive/gamemode
that referenced
this pull request
May 26, 2020
When there are not valid standard file descriptors then strange things can happen. When new file descriptors are opened, they will take the place of the former standard file descriptors and when e.g. somebody calls printf() they will write to some file descriptor that is not prepared for it. This would already happen during PLOG_MSG() in gamemoded. Actually this also causes a SIGABRT when calling gamemoded like this: ```bash gamemoded -d ``` This is due to a bug [1] in systemd that causes an assertion to be triggered. This shows that file descriptor zero is in this case being replaced by a UNIX domain socket representing the connection to the D-Bus session bus. Therefore instead of just closing the standard file descriptors, replace them by appropriate file descriptors refering to /dev/null. [1]: systemd/systemd#8080
eumpf0
pushed a commit
to eumpf0/systemd
that referenced
this pull request
Dec 31, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Don't assert on zero-value fds.