Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* relbump * fixes issues about "Connection timed out" see systemd/systemd#1505
- Loading branch information
Showing
2 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
32 changes: 32 additions & 0 deletions
32
source/base/systemd/Revert-sd_pid_notify_with_fds-fix-computing-msg_cont.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From: Martin Pitt <martin.pitt@ubuntu.com> | ||
Date: Fri, 9 Oct 2015 11:19:38 +0200 | ||
Subject: Revert "sd_pid_notify_with_fds: fix computing msg_controllen" | ||
|
||
This causes connection errors from various services on boot. | ||
|
||
This reverts commit a5bd3c32abb00ad945282568fd1a97c180b68047. | ||
|
||
https://github.com/systemd/systemd/issues/1505 | ||
Closes: #801354 | ||
--- | ||
src/libsystemd/sd-daemon/sd-daemon.c | 7 ++----- | ||
1 file changed, 2 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/src/libsystemd/sd-daemon/sd-daemon.c b/src/libsystemd/sd-daemon/sd-daemon.c | ||
index ae534ba..251da04 100644 | ||
--- a/src/libsystemd/sd-daemon/sd-daemon.c | ||
+++ b/src/libsystemd/sd-daemon/sd-daemon.c | ||
@@ -449,11 +449,8 @@ _public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char | ||
have_pid = pid != 0 && pid != getpid(); | ||
|
||
if (n_fds > 0 || have_pid) { | ||
- /* CMSG_SPACE(0) may return value different then zero, which results in miscalculated controllen. */ | ||
- msghdr.msg_controllen = | ||
- (n_fds > 0 ? CMSG_SPACE(sizeof(int) * n_fds) : 0) + | ||
- (have_pid ? CMSG_SPACE(sizeof(struct ucred)) : 0); | ||
- | ||
+ msghdr.msg_controllen = CMSG_SPACE(sizeof(int) * n_fds) + | ||
+ CMSG_SPACE(sizeof(struct ucred) * have_pid); | ||
msghdr.msg_control = alloca0(msghdr.msg_controllen); | ||
|
||
cmsg = CMSG_FIRSTHDR(&msghdr); |