summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2001-06-25 06:28:48 +0000
committerdinoex <dinoex@FreeBSD.org>2001-06-25 06:28:48 +0000
commit89cc4110ce1dc0272367deb35f26b578315e23e2 (patch)
tree6d4c6e4797eee3233d41a5fa764afd4b394e0573 /security
parent3e4628adad28da1b56dd5ea05abd61ee8f6449a3 (diff)
downloadFreeBSD-ports-89cc4110ce1dc0272367deb35f26b578315e23e2.zip
FreeBSD-ports-89cc4110ce1dc0272367deb35f26b578315e23e2.tar.gz
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
Diffstat (limited to 'security')
-rw-r--r--security/openssh/Makefile2
-rw-r--r--security/openssh/files/patch-au44
2 files changed, 42 insertions, 4 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile
index b5cff8e..0e33304 100644
--- a/security/openssh/Makefile
+++ b/security/openssh/Makefile
@@ -7,7 +7,7 @@
PORTNAME= OpenSSH
PORTVERSION= 2.9
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= security
MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/ \
ftp://ftp.usa.openbsd.org/pub/OpenBSD/OpenSSH/ \
diff --git a/security/openssh/files/patch-au b/security/openssh/files/patch-au
index 23d255a..35bb978 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) {
OpenPOWER on IntegriCloud