diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2001-06-25 06:28:48 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2001-06-25 06:28:48 +0000 |
commit | 817e1df8d4d3754609e456dcf214f16a43b71f2c (patch) | |
tree | a014b3283f80e393267549573d1bcac38f612d6a /security/openssh/files | |
parent | 966c3a0792038381e9095c7461572d459fb92560 (diff) | |
download | ports-817e1df8d4d3754609e456dcf214f16a43b71f2c.tar.gz ports-817e1df8d4d3754609e456dcf214f16a43b71f2c.zip |
This adds two environment variables into environment of user: LANG & MM_CHARSET,
when used standard login via telnet or console
However when used openssh, then sshd does not setup LANG & MM_CHARSET into envir
onment for user in russian class
Code for this operation did not exists in openssh port !
PR: 21146
Submitted by: odip@bionet.nsc.ru
Notes
Notes:
svn path=/head/; revision=44413
Diffstat (limited to 'security/openssh/files')
-rw-r--r-- | security/openssh/files/patch-au | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/security/openssh/files/patch-au b/security/openssh/files/patch-au index 23d255a0f62a..35bb978e08c1 100644 --- a/security/openssh/files/patch-au +++ b/security/openssh/files/patch-au @@ -1,5 +1,5 @@ --- session.c.orig Tue Apr 17 21:34:25 2001 -+++ session.c Sun Jun 10 19:42:13 2001 ++++ session.c Mon Jun 25 07:51:19 2001 @@ -58,6 +58,12 @@ #include "canohost.h" #include "session.h" @@ -75,7 +75,45 @@ do_motd(); } -@@ -1027,7 +1067,7 @@ +@@ -914,6 +954,10 @@ + env[0] = NULL; + + if (!options.use_login) { ++#ifdef HAVE_LOGIN_CAP ++ char *var; ++#endif /* HAVE_LOGIN_CAP */ ++ + /* Set basic environment. */ + child_set_env(&env, &envsize, "USER", pw->pw_name); + child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); +@@ -921,6 +965,12 @@ + #ifdef HAVE_LOGIN_CAP + (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH); + child_set_env(&env, &envsize, "PATH", getenv("PATH")); ++ var= login_getcapstr(lc, "lang", NULL, NULL); ++ if ( var ) child_set_env(&env, &envsize, "LANG", var); ++ var= login_getcapstr(lc, "charset", NULL, NULL); ++ if ( var ) child_set_env(&env, &envsize, "MM_CHARSET", var); ++ var= login_getcapstr(lc, "timezone", NULL, NULL); ++ if ( var ) child_set_env(&env, &envsize, "TZ", var); + #else + child_set_env(&env, &envsize, "PATH", _PATH_STDPATH); + #endif +@@ -932,8 +982,13 @@ + /* Normal systems set SHELL by default. */ + child_set_env(&env, &envsize, "SHELL", shell); + } ++#ifdef HAVE_LOGIN_CAP ++#else /* HAVE_LOGIN_CAP */ ++ if (getenv("TZ")) ++ child_set_env(&env, &envsize, "TZ", getenv("TZ")); + if (getenv("TZ")) + child_set_env(&env, &envsize, "TZ", getenv("TZ")); ++#endif /* HAVE_LOGIN_CAP */ + + /* Set custom environment options from RSA authentication. */ + while (custom_environment) { +@@ -1027,7 +1082,7 @@ * initgroups, because at least on Solaris 2.3 it leaves file * descriptors open. */ @@ -84,7 +122,7 @@ close(i); /* Change current directory to the user\'s home directory. */ -@@ -1051,6 +1091,28 @@ +@@ -1051,6 +1106,28 @@ * in this order). */ if (!options.use_login) { |