aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuniyuki Iwashima <[email protected]>2023-06-26 13:58:37 -0700
committerJakub Kicinski <[email protected]>2023-06-27 09:35:53 -0700
commit9d797ee2dce1e3e243bcc18dad7728df72fd11a4 (patch)
tree12359922be3264a2cf0e25da7a36cc3746fb039a
parent1a3f6fc430ed220889c7fb1a63bc2a30267ebc2a (diff)
Revert "af_unix: Call scm_recv() only after scm_set_cred()."
This reverts commit 3f5f118bb657f94641ea383c7c1b8c09a5d46ea2. Konrad reported that desktop environment below cannot be reached after commit 3f5f118bb657 ("af_unix: Call scm_recv() only after scm_set_cred().") - postmarketOS (Alpine Linux w/ musl 1.2.4) - busybox 1.36.1 - GNOME 44.1 - networkmanager 1.42.6 - openrc 0.47 Regarding to the warning of SO_PASSPIDFD, I'll post another patch to suppress it by skipping SCM_PIDFD if scm->pid == NULL in scm_pidfd_recv(). Reported-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/netdev/[email protected]/ Signed-off-by: Kuniyuki Iwashima <[email protected]> Tested-by: Ido Schimmel <[email protected]> Tested-by: Gal Pressman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--net/unix/af_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index f2f234f0b92c..3953daa2e1d0 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2807,7 +2807,7 @@ unlock:
} while (size);
mutex_unlock(&u->iolock);
- if (state->msg && check_creds)
+ if (state->msg)
scm_recv(sock, state->msg, &scm, flags);
else
scm_destroy(&scm);