[openssh-commits] [openssh] 02/02: upstream: Export XDG_RUNTIME_DIR to child ssh sessions

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Nov 18 11:30:02 AEDT 2025


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 58533bbdf7aa0548de8e2abd3cb2de0593fa9fdc
Author: jca at openbsd.org <jca at openbsd.org>
AuthorDate: Mon Nov 17 12:59:29 2025 +0000

    upstream: Export XDG_RUNTIME_DIR to child ssh sessions
    
    Currently setusercontext(LOGIN_SETALL) does create the directory in
    /tmp/run/user, since LOGIN_SETXDGENV is part of LOGIN_SETALL, but the
    env variable wasn't exported.
    
    ok djm@
    
    OpenBSD-Commit-ID: 02b8433f72759b3a07b55cbc5a7cdb84391b0017
---
 session.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/session.c b/session.c
index f265fdc3e..34b049a0f 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.344 2025/09/25 02:15:39 jsg Exp $ */
+/* $OpenBSD: session.c,v 1.345 2025/11/17 12:59:29 jca Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -1012,6 +1012,12 @@ do_setup_env(struct ssh *ssh, Session *s, const char *shell)
 
 	if (getenv("TZ"))
 		child_set_env(&env, &envsize, "TZ", getenv("TZ"));
+#ifdef HAVE_LOGIN_CAP
+	if (getenv("XDG_RUNTIME_DIR")) {
+		child_set_env(&env, &envsize, "XDG_RUNTIME_DIR",
+		    getenv("XDG_RUNTIME_DIR"));
+	}
+#endif /* HAVE_LOGIN_CAP */
 	if (s->term)
 		child_set_env(&env, &envsize, "TERM", s->term);
 	if (s->display)

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list