diff options
-rw-r--r-- | CREDITS | 3 | ||||
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | acconfig.h | 9 | ||||
-rw-r--r-- | auth-passwd.c | 16 | ||||
-rw-r--r-- | bsd-misc.c | 3 | ||||
-rw-r--r-- | cipher.c | 3 | ||||
-rw-r--r-- | configure.in | 44 | ||||
-rw-r--r-- | ssh.c | 6 | ||||
-rw-r--r-- | ssh.h | 54 | ||||
-rw-r--r-- | sshd.c | 38 |
10 files changed, 167 insertions, 11 deletions
@@ -15,7 +15,7 @@ Chun-Chung Chen <cjj@u.washington.edu> - RPM fixes | |||
15 | Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes | 15 | Dan Brosemer <odin@linuxfreak.com> - Autoconf support, build fixes |
16 | Darren Hall <dhall@virage.org> - AIX patches | 16 | Darren Hall <dhall@virage.org> - AIX patches |
17 | David Agraz <dagraz@jahoopa.com> - Build fixes | 17 | David Agraz <dagraz@jahoopa.com> - Build fixes |
18 | David Rankin <drankin@bohemians.lexington.ky.us> - libwrap, NetBSD fixes | 18 | David Rankin <drankin@bohemians.lexington.ky.us> - libwrap, AIX, NetBSD fixes |
19 | Gary E. Miller <gem@rellim.com> - SCO support | 19 | Gary E. Miller <gem@rellim.com> - SCO support |
20 | Holger Trapp <Holger.Trapp@Informatik.TU-Chemnitz.DE> - KRB4/AFS config patch | 20 | Holger Trapp <Holger.Trapp@Informatik.TU-Chemnitz.DE> - KRB4/AFS config patch |
21 | Jani Hakala <jahakala@cc.jyu.fi> - Patches | 21 | Jani Hakala <jahakala@cc.jyu.fi> - Patches |
@@ -26,6 +26,7 @@ Juergen Keil <jk@tools.de> - scp bugfixing | |||
26 | Kees Cook <cook@cpoint.net> - scp fixes | 26 | Kees Cook <cook@cpoint.net> - scp fixes |
27 | Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes | 27 | Kiyokazu SUTO <suto@ks-and-ks.ne.jp> - Bugfixes |
28 | Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches | 28 | Marc G. Fournier <marc.fournier@acadiau.ca> - Solaris patches |
29 | Matt Richards <v2matt@btv.ibm.com> - AIX patches | ||
29 | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch | 30 | Nalin Dahyabhai <nalin.dahyabhai@pobox.com> - PAM environment patch |
30 | Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches | 31 | Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches |
31 | Peter Kocks <peter.kocks@baygate.com> - Makefile fixes | 32 | Peter Kocks <peter.kocks@baygate.com> - Makefile fixes |
@@ -2,6 +2,8 @@ | |||
2 | - OpenBSD CVS: | 2 | - OpenBSD CVS: |
3 | - [packet.c] | 3 | - [packet.c] |
4 | getsockname() requires initialized tolen; andy@guildsoftware.com | 4 | getsockname() requires initialized tolen; andy@guildsoftware.com |
5 | - AIX patch from Matt Richards <v2matt@btv.ibm.com> and David Rankin | ||
6 | <drankin@bohemians.lexington.ky.us> | ||
5 | 7 | ||
6 | 20000122 | 8 | 20000122 |
7 | - Fix compilation of bsd-snprintf.c on Solaris, fix from Ben Taylor | 9 | - Fix compilation of bsd-snprintf.c on Solaris, fix from Ben Taylor |
diff --git a/acconfig.h b/acconfig.h index c5e6d3ee7..e96b195dc 100644 --- a/acconfig.h +++ b/acconfig.h | |||
@@ -12,6 +12,9 @@ | |||
12 | /* Define if you want to disable PAM support */ | 12 | /* Define if you want to disable PAM support */ |
13 | #undef DISABLE_PAM | 13 | #undef DISABLE_PAM |
14 | 14 | ||
15 | /* Define if you want to disable AIX4's authenticate function */ | ||
16 | #undef WITH_AIXAUTHENTICATE | ||
17 | |||
15 | /* Define if you want to disable lastlog support */ | 18 | /* Define if you want to disable lastlog support */ |
16 | #undef DISABLE_LASTLOG | 19 | #undef DISABLE_LASTLOG |
17 | 20 | ||
@@ -30,6 +33,12 @@ | |||
30 | /* Define if using the Dante SOCKS library. */ | 33 | /* Define if using the Dante SOCKS library. */ |
31 | #undef HAVE_DANTE | 34 | #undef HAVE_DANTE |
32 | 35 | ||
36 | /* Define if using the Socks4 SOCKS library. */ | ||
37 | #undef HAVE_SOCKS4 | ||
38 | |||
39 | /* Define if using the Socks5 SOCKS library. */ | ||
40 | #undef HAVE_SOCKS5 | ||
41 | |||
33 | /* Define if you want to install preformatted manpages.*/ | 42 | /* Define if you want to install preformatted manpages.*/ |
34 | #undef MANTYPE | 43 | #undef MANTYPE |
35 | 44 | ||
diff --git a/auth-passwd.c b/auth-passwd.c index a8a52ce9a..278212aa5 100644 --- a/auth-passwd.c +++ b/auth-passwd.c | |||
@@ -11,13 +11,17 @@ | |||
11 | 11 | ||
12 | #ifndef USE_PAM | 12 | #ifndef USE_PAM |
13 | 13 | ||
14 | RCSID("$Id: auth-passwd.c,v 1.15 2000/01/06 01:03:13 damien Exp $"); | 14 | RCSID("$Id: auth-passwd.c,v 1.16 2000/01/22 23:32:03 damien Exp $"); |
15 | 15 | ||
16 | #include "packet.h" | 16 | #include "packet.h" |
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "servconf.h" | 18 | #include "servconf.h" |
19 | #include "xmalloc.h" | 19 | #include "xmalloc.h" |
20 | 20 | ||
21 | #ifdef WITH_AIXAUTHENTICATE | ||
22 | #include <login.h> | ||
23 | #endif | ||
24 | |||
21 | #ifdef HAVE_SHADOW_H | 25 | #ifdef HAVE_SHADOW_H |
22 | # include <shadow.h> | 26 | # include <shadow.h> |
23 | #endif | 27 | #endif |
@@ -39,6 +43,11 @@ auth_password(struct passwd * pw, const char *password) | |||
39 | #ifdef HAVE_SHADOW_H | 43 | #ifdef HAVE_SHADOW_H |
40 | struct spwd *spw; | 44 | struct spwd *spw; |
41 | #endif | 45 | #endif |
46 | #ifdef WITH_AIXAUTHENTICATE | ||
47 | char *authmsg; | ||
48 | char *loginmsg; | ||
49 | int reenter = 1; | ||
50 | #endif | ||
42 | 51 | ||
43 | /* deny if no user. */ | 52 | /* deny if no user. */ |
44 | if (pw == NULL) | 53 | if (pw == NULL) |
@@ -56,6 +65,11 @@ auth_password(struct passwd * pw, const char *password) | |||
56 | /* Fall back to ordinary passwd authentication. */ | 65 | /* Fall back to ordinary passwd authentication. */ |
57 | } | 66 | } |
58 | #endif | 67 | #endif |
68 | |||
69 | #ifdef WITH_AIXAUTHENTICATE | ||
70 | return (authenticate(pw->pw_name,password,&reenter,&authmsg) == 0); | ||
71 | #endif | ||
72 | |||
59 | #ifdef KRB4 | 73 | #ifdef KRB4 |
60 | if (options.kerberos_authentication == 1) { | 74 | if (options.kerberos_authentication == 1) { |
61 | int ret = auth_krb4_password(pw, password); | 75 | int ret = auth_krb4_password(pw, password); |
diff --git a/bsd-misc.c b/bsd-misc.c index 2328e5739..b2c70c680 100644 --- a/bsd-misc.c +++ b/bsd-misc.c | |||
@@ -47,6 +47,9 @@ | |||
47 | #include <sys/socket.h> | 47 | #include <sys/socket.h> |
48 | #include <sys/un.h> | 48 | #include <sys/un.h> |
49 | #include <fcntl.h> | 49 | #include <fcntl.h> |
50 | #ifdef HAVE_STDDEF_H | ||
51 | #include <stddef.h> | ||
52 | #endif | ||
50 | 53 | ||
51 | #include "xmalloc.h" | 54 | #include "xmalloc.h" |
52 | #include "ssh.h" | 55 | #include "ssh.h" |
@@ -12,10 +12,11 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$Id: cipher.c,v 1.11 1999/12/14 22:34:31 damien Exp $"); | 15 | RCSID("$Id: cipher.c,v 1.12 2000/01/22 23:32:03 damien Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "cipher.h" | 18 | #include "cipher.h" |
19 | #include "config.h" | ||
19 | 20 | ||
20 | #ifdef HAVE_OPENSSL | 21 | #ifdef HAVE_OPENSSL |
21 | #include <openssl/md5.h> | 22 | #include <openssl/md5.h> |
diff --git a/configure.in b/configure.in index 4d414573f..6f5cdafc7 100644 --- a/configure.in +++ b/configure.in | |||
@@ -518,13 +518,53 @@ dnl Compile with dante SOCKS library | |||
518 | AC_ARG_WITH(dante, | 518 | AC_ARG_WITH(dante, |
519 | [ --with-dante=DIR Use Dante SOCKS lib (default is system library path)], | 519 | [ --with-dante=DIR Use Dante SOCKS lib (default is system library path)], |
520 | [ | 520 | [ |
521 | AC_DEFINE(HAVE_DANTE) | 521 | SAVELIBS="$LIBS" |
522 | SOCKSLIBS="" | ||
523 | SOCKSLIBPATH="" | ||
522 | if test "x$withval" != "xno" ; then | 524 | if test "x$withval" != "xno" ; then |
523 | if test -n $withval ; then | 525 | if test -n $withval ; then |
524 | LIBS="$LIBS -L$withval" | 526 | LIBS="$LIBS -L$withval" |
527 | SOCKSLIBPATH="-L$withval" | ||
525 | fi | 528 | fi |
526 | LIBS="$LIBS -lsocks" | 529 | AC_CHECK_LIB(socks, Rconnect, AC_DEFINE(HAVE_DANTE) SOCKSLIBS="$SOCKSLIBPATH -lsocks") |
527 | fi | 530 | fi |
531 | LIBS="$SAVELIBS $SOCKSLIBS" | ||
532 | ] | ||
533 | ) | ||
534 | |||
535 | dnl Compile with SOCKS4 SOCKS library | ||
536 | AC_ARG_WITH(socks4, | ||
537 | [ --with-socks4=DIR Use Socks4 SOCKS lib (default is system library path)], | ||
538 | [ | ||
539 | SAVELIBS="$LIBS" | ||
540 | SOCKSLIBS="" | ||
541 | SOCKSLIBPATH="" | ||
542 | if test "x$withval" != "xno" ; then | ||
543 | if test -n $withval ; then | ||
544 | LIBS="$LIBS -L$withval" | ||
545 | SOCKSLIBPATH="-L$withval" | ||
546 | fi | ||
547 | AC_CHECK_LIB(socks, Rconnect, AC_DEFINE(HAVE_SOCKS4) SOCKSLIBS="$SOCKSLIBPATH -lsocks") | ||
548 | fi | ||
549 | LIBS="$SAVELIBS $SOCKSLIBS" | ||
550 | ] | ||
551 | ) | ||
552 | |||
553 | dnl Compile with SOCKS5 SOCKS library | ||
554 | AC_ARG_WITH(socks5, | ||
555 | [ --with-socks5=DIR Use Socks5 SOCKS lib (default is system library path)], | ||
556 | [ | ||
557 | SAVELIBS="$LIBS" | ||
558 | SOCKSLIBS="" | ||
559 | SOCKSLIBPATH="" | ||
560 | if test "x$withval" != "xno" ; then | ||
561 | if test -n $withval ; then | ||
562 | LIBS="$LIBS -L$withval" | ||
563 | SOCKSLIBPATH="-L$withval" | ||
564 | fi | ||
565 | AC_CHECK_LIB(socks5, SOCKSconnect, AC_DEFINE(HAVE_SOCKS5) SOCKSLIBS="$SOCKSLIBPATH -lsocks5") | ||
566 | fi | ||
567 | LIBS="$SAVELIBS $SOCKSLIBS" | ||
528 | ] | 568 | ] |
529 | ) | 569 | ) |
530 | AC_ARG_WITH(catman, | 570 | AC_ARG_WITH(catman, |
@@ -11,7 +11,7 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include "includes.h" | 13 | #include "includes.h" |
14 | RCSID("$Id: ssh.c,v 1.17 2000/01/19 03:36:49 damien Exp $"); | 14 | RCSID("$Id: ssh.c,v 1.18 2000/01/22 23:32:04 damien Exp $"); |
15 | 15 | ||
16 | #include "xmalloc.h" | 16 | #include "xmalloc.h" |
17 | #include "ssh.h" | 17 | #include "ssh.h" |
@@ -217,6 +217,10 @@ main(int ac, char **av) | |||
217 | /* Save our own name. */ | 217 | /* Save our own name. */ |
218 | av0 = av[0]; | 218 | av0 = av[0]; |
219 | 219 | ||
220 | #ifdef SOCKS | ||
221 | SOCKSinit(av0); | ||
222 | #endif /* SOCKS */ | ||
223 | |||
220 | /* Initialize option structure to indicate that no values have been set. */ | 224 | /* Initialize option structure to indicate that no values have been set. */ |
221 | initialize_options(&options); | 225 | initialize_options(&options); |
222 | 226 | ||
@@ -13,7 +13,7 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | /* RCSID("$Id: ssh.h,v 1.24 2000/01/14 04:45:52 damien Exp $"); */ | 16 | /* RCSID("$Id: ssh.h,v 1.25 2000/01/22 23:32:04 damien Exp $"); */ |
17 | 17 | ||
18 | #ifndef SSH_H | 18 | #ifndef SSH_H |
19 | #define SSH_H | 19 | #define SSH_H |
@@ -752,7 +752,7 @@ extern int IPv4or6; | |||
752 | #include "auth-pam.h" | 752 | #include "auth-pam.h" |
753 | #endif /* USE_PAM */ | 753 | #endif /* USE_PAM */ |
754 | 754 | ||
755 | #ifdef HAVE_DANTE | 755 | #if defined(HAVE_DANTE) || defined(HAVE_SOCKS4) |
756 | /* | 756 | /* |
757 | * The following defines map the normal socket operations to SOCKSified | 757 | * The following defines map the normal socket operations to SOCKSified |
758 | * versions coming from the Dante SOCKS package. | 758 | * versions coming from the Dante SOCKS package. |
@@ -795,6 +795,54 @@ ssize_t Rsendto (int, const void *, | |||
795 | size_t, int, const struct sockaddr *, socklen_t); | 795 | size_t, int, const struct sockaddr *, socklen_t); |
796 | ssize_t Rwrite(int , const void *, size_t ); | 796 | ssize_t Rwrite(int , const void *, size_t ); |
797 | ssize_t Rwritev(int , const struct iovec *, int ); | 797 | ssize_t Rwritev(int , const struct iovec *, int ); |
798 | #endif /* HAVE_DANTE */ | 798 | #endif /* HAVE_DANTE || HAVE_SOCKS4 */ |
799 | 799 | ||
800 | #if defined(HAVE_SOCKS5) | ||
801 | /* | ||
802 | * The following defines map the normal socket operations to SOCKSified | ||
803 | * versions coming from the SOCKS package. | ||
804 | */ | ||
805 | #define accept SOCKSaccept | ||
806 | #define bind SOCKSbind | ||
807 | #define bindresvport SOCKSbindresvport | ||
808 | #define connect SOCKSconnect | ||
809 | #define gethostbyname SOCKSgethostbyname | ||
810 | #define gethostbyname2 SOCKSgethostbyname2 | ||
811 | #define getpeername SOCKSgetpeername | ||
812 | #define getsockname SOCKSgetsockname | ||
813 | #define read SOCKSread | ||
814 | #define readv SOCKSreadv | ||
815 | #define recv SOCKSrecv | ||
816 | #define recvmsg SOCKSrecvmsg | ||
817 | #define recvfrom SOCKSrecvfrom | ||
818 | #define rresvport SOCKSrresvport | ||
819 | #define send SOCKSsend | ||
820 | #define sendmsg SOCKSsendmsg | ||
821 | #define sendto SOCKSsendto | ||
822 | #define write SOCKSwrite | ||
823 | #define writev SOCKSwritev | ||
824 | int SOCKSaccept (int, struct sockaddr *, socklen_t *); | ||
825 | int SOCKSbind (int, const struct sockaddr *, socklen_t); | ||
826 | int SOCKSbindresvport(int , struct sockaddr_in *); | ||
827 | int SOCKSconnect (int, const struct sockaddr *, socklen_t); | ||
828 | struct hostent *SOCKSgethostbyname(const char *); | ||
829 | struct hostent *SOCKSgethostbyname2(const char *, int); | ||
830 | int SOCKSgetpeername (int, struct sockaddr *, socklen_t *); | ||
831 | int SOCKSgetsockname (int, struct sockaddr *, socklen_t *); | ||
832 | ssize_t SOCKSread(int , void *, size_t ); | ||
833 | ssize_t SOCKSreadv(int d, const struct iovec *iov, int iovcnt); | ||
834 | ssize_t SOCKSrecv (int, void *, size_t, int); | ||
835 | ssize_t SOCKSrecvfrom (int, void *, size_t, int, struct sockaddr *, | ||
836 | socklen_t *); | ||
837 | ssize_t SOCKSsend (int, const void *, size_t, int); | ||
838 | ssize_t SOCKSsendmsg (int, const struct msghdr *, int); | ||
839 | ssize_t SOCKSsendto (int, const void *, | ||
840 | size_t, int, const struct sockaddr *, socklen_t); | ||
841 | ssize_t SOCKSwrite(int , const void *, size_t ); | ||
842 | ssize_t SOCKSwritev(int , const struct iovec *, int ); | ||
843 | #endif /* SOCKS5 */ | ||
844 | |||
845 | #if defined(DANTE) || defined(SOCKS4) || defined(SOCKS5) | ||
846 | #define SOCKS | ||
847 | #endif /* defined(DANTE) || defined(SOCKS4) || defined(SOCKS5) */ | ||
800 | #endif /* SSH_H */ | 848 | #endif /* SSH_H */ |
@@ -1099,6 +1099,9 @@ allowed_user(struct passwd * pw) | |||
1099 | { | 1099 | { |
1100 | struct group *grp; | 1100 | struct group *grp; |
1101 | int i; | 1101 | int i; |
1102 | #ifdef WITH_AIXAUTHENTICATE | ||
1103 | char *loginmsg; | ||
1104 | #endif /* WITH_AIXAUTHENTICATE */ | ||
1102 | 1105 | ||
1103 | /* Shouldn't be called if pw is NULL, but better safe than sorry... */ | 1106 | /* Shouldn't be called if pw is NULL, but better safe than sorry... */ |
1104 | if (!pw) | 1107 | if (!pw) |
@@ -1155,6 +1158,12 @@ allowed_user(struct passwd * pw) | |||
1155 | return 0; | 1158 | return 0; |
1156 | } | 1159 | } |
1157 | } | 1160 | } |
1161 | |||
1162 | #ifdef WITH_AIXAUTHENTICATE | ||
1163 | if (loginrestrictions(pw->pw_name,S_LOGIN,NULL,&loginmsg) != 0) | ||
1164 | return 0; | ||
1165 | #endif /* WITH_AIXAUTHENTICATE */ | ||
1166 | |||
1158 | /* We found no reason not to let this user try to log on... */ | 1167 | /* We found no reason not to let this user try to log on... */ |
1159 | return 1; | 1168 | return 1; |
1160 | } | 1169 | } |
@@ -1179,6 +1188,10 @@ do_authentication() | |||
1179 | 1188 | ||
1180 | setproctitle("%s", user); | 1189 | setproctitle("%s", user); |
1181 | 1190 | ||
1191 | #ifdef WITH_AIXAUTHENTICATE | ||
1192 | char *loginmsg; | ||
1193 | #endif /* WITH_AIXAUTHENTICATE */ | ||
1194 | |||
1182 | #ifdef AFS | 1195 | #ifdef AFS |
1183 | /* If machine has AFS, set process authentication group. */ | 1196 | /* If machine has AFS, set process authentication group. */ |
1184 | if (k_hasafs()) { | 1197 | if (k_hasafs()) { |
@@ -1244,6 +1257,9 @@ do_authentication() | |||
1244 | get_canonical_hostname()); | 1257 | get_canonical_hostname()); |
1245 | } | 1258 | } |
1246 | /* The user has been authenticated and accepted. */ | 1259 | /* The user has been authenticated and accepted. */ |
1260 | #ifdef WITH_AIXAUTHENTICATE | ||
1261 | loginsuccess(user,get_canonical_hostname(),"ssh",&loginmsg); | ||
1262 | #endif /* WITH_AIXAUTHENTICATE */ | ||
1247 | packet_start(SSH_SMSG_SUCCESS); | 1263 | packet_start(SSH_SMSG_SUCCESS); |
1248 | packet_send(); | 1264 | packet_send(); |
1249 | packet_write_wait(); | 1265 | packet_write_wait(); |
@@ -1498,8 +1514,7 @@ do_authloop(struct passwd * pw) | |||
1498 | 1514 | ||
1499 | if (authenticated) { | 1515 | if (authenticated) { |
1500 | #ifdef USE_PAM | 1516 | #ifdef USE_PAM |
1501 | if (!do_pam_account(pw->pw_name, client_user)) | 1517 | if (!do_pam_account(pw->pw_name, client_user)) { |
1502 | { | ||
1503 | if (client_user != NULL) | 1518 | if (client_user != NULL) |
1504 | xfree(client_user); | 1519 | xfree(client_user); |
1505 | 1520 | ||
@@ -1582,6 +1597,11 @@ do_fake_authloop(char *user) | |||
1582 | packet_start(SSH_SMSG_FAILURE); | 1597 | packet_start(SSH_SMSG_FAILURE); |
1583 | packet_send(); | 1598 | packet_send(); |
1584 | packet_write_wait(); | 1599 | packet_write_wait(); |
1600 | #ifdef WITH_AIXAUTHENTICATE | ||
1601 | if (strncmp(get_authname(type),"password", | ||
1602 | strlen(get_authname(type))) == 0) | ||
1603 | loginfailed(pw->pw_name,get_canonical_hostname(),"ssh"); | ||
1604 | #endif /* WITH_AIXAUTHENTICATE */ | ||
1585 | } | 1605 | } |
1586 | /* NOTREACHED */ | 1606 | /* NOTREACHED */ |
1587 | abort(); | 1607 | abort(); |
@@ -2423,6 +2443,18 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
2423 | if (display) | 2443 | if (display) |
2424 | child_set_env(&env, &envsize, "DISPLAY", display); | 2444 | child_set_env(&env, &envsize, "DISPLAY", display); |
2425 | 2445 | ||
2446 | #ifdef _AIX | ||
2447 | { | ||
2448 | char *authstate,*krb5cc; | ||
2449 | |||
2450 | if ((authstate = getenv("AUTHSTATE")) != NULL) | ||
2451 | child_set_env(&env,&envsize,"AUTHSTATE",authstate); | ||
2452 | |||
2453 | if ((krb5cc = getenv("KRB5CCNAME")) != NULL) | ||
2454 | child_set_env(&env,&envsize,"KRB5CCNAME",krb5cc); | ||
2455 | } | ||
2456 | #endif | ||
2457 | |||
2426 | #ifdef KRB4 | 2458 | #ifdef KRB4 |
2427 | { | 2459 | { |
2428 | extern char *ticket; | 2460 | extern char *ticket; |
@@ -2444,6 +2476,8 @@ do_child(const char *command, struct passwd * pw, const char *term, | |||
2444 | child_set_env(&env, &envsize, SSH_AUTHSOCKET_ENV_NAME, | 2476 | child_set_env(&env, &envsize, SSH_AUTHSOCKET_ENV_NAME, |
2445 | auth_get_socket_name()); | 2477 | auth_get_socket_name()); |
2446 | 2478 | ||
2479 | read_environment_file(&env,&envsize,"/etc/environment"); | ||
2480 | |||
2447 | /* read $HOME/.ssh/environment. */ | 2481 | /* read $HOME/.ssh/environment. */ |
2448 | if (!options.use_login) { | 2482 | if (!options.use_login) { |
2449 | snprintf(buf, sizeof buf, "%.200s/.ssh/environment", pw->pw_dir); | 2483 | snprintf(buf, sizeof buf, "%.200s/.ssh/environment", pw->pw_dir); |