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

socket-util: fix getpeergroups() assert(fd) #8080

Merged
merged 1 commit into from Feb 3, 2018

Conversation

2 participants
@vcaputo
Member

vcaputo commented Feb 3, 2018

Don't assert on zero-value fds.

socket-util: fix getpeergroups() assert(fd)
Don't assert on zero-value fds.
@yuwata

This comment has been minimized.

Member

yuwata commented Feb 3, 2018

lgtm.

@yuwata yuwata merged commit 75f4077 into systemd:master Feb 3, 2018

3 checks passed

Fedora Rawhide CI x86_64 rpm build [succeeded]
Details
semaphoreci The build passed on Semaphore.
Details
xenial-amd64 autopkgtest finished (success)
Details

@agaida agaida referenced this pull request Feb 14, 2018

Closed

unpackfs fails, rsync error 10 #907

1 of 2 tasks complete

aughr added a commit to aughr/systemd that referenced this pull request Apr 10, 2018

mgerstner added a commit to mgerstner/gamemode that referenced this pull request Jul 30, 2018

daemonize: instead of just closing STD*_FILENO replace them by /dev/null
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment