[openssh-commits] [openssh] 01/01: upstream: use _PATH_SSH_USER_DIR instead of hardcoded .ssh in path

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Dec 14 15:38:56 AEDT 2020


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

djm pushed a commit to branch master
in repository openssh.

commit bef92346c4a808f33216e54d6f4948f9df2ad7c1
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Mon Dec 14 03:13:12 2020 +0000

    upstream: use _PATH_SSH_USER_DIR instead of hardcoded .ssh in path
    
    OpenBSD-Commit-ID: 5c1048468813107baa872f5ee33ba51623630e01
---
 session.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/session.c b/session.c
index 2f716ce9..e63fc472 100644
--- a/session.c
+++ b/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.326 2020/11/28 03:27:59 djm Exp $ */
+/* $OpenBSD: session.c,v 1.327 2020/12/14 03:13:12 djm Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -1120,8 +1120,8 @@ do_setup_env(struct ssh *ssh, Session *s, const char *shell)
 
 	/* read $HOME/.ssh/environment. */
 	if (options.permit_user_env) {
-		snprintf(buf, sizeof buf, "%.200s/.ssh/environment",
-		    pw->pw_dir);
+		snprintf(buf, sizeof buf, "%.200s/%s/environment",
+		    pw->pw_dir, _PATH_SSH_USER_DIR);
 		read_environment_file(&env, &envsize, buf,
 		    options.permit_user_env_allowlist);
 	}

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


More information about the openssh-commits mailing list