diff options
-rw-r--r-- | security/hpn-ssh/Makefile | 3 | ||||
-rw-r--r-- | security/hpn-ssh/distinfo | 2 | ||||
-rw-r--r-- | security/hpn-ssh/files/auth2-pam-freebsd.c | 22 | ||||
-rw-r--r-- | security/hpn-ssh/files/patch-Makefile.in | 9 | ||||
-rw-r--r-- | security/hpn-ssh/files/patch-configure | 11 | ||||
-rw-r--r-- | security/hpn-ssh/files/patch-defines.h | 11 | ||||
-rw-r--r-- | security/hpn-ssh/files/patch-session.c | 61 | ||||
-rw-r--r-- | security/openssh-portable/Makefile | 3 | ||||
-rw-r--r-- | security/openssh-portable/distinfo | 2 | ||||
-rw-r--r-- | security/openssh-portable/files/auth2-pam-freebsd.c | 22 | ||||
-rw-r--r-- | security/openssh-portable/files/patch-Makefile.in | 9 | ||||
-rw-r--r-- | security/openssh-portable/files/patch-configure | 11 | ||||
-rw-r--r-- | security/openssh-portable/files/patch-defines.h | 11 | ||||
-rw-r--r-- | security/openssh-portable/files/patch-session.c | 61 |
14 files changed, 68 insertions, 170 deletions
diff --git a/security/hpn-ssh/Makefile b/security/hpn-ssh/Makefile index 6a89bf044724..b933b97199e5 100644 --- a/security/hpn-ssh/Makefile +++ b/security/hpn-ssh/Makefile @@ -6,8 +6,7 @@ # PORTNAME= openssh -PORTVERSION= 3.4p1 -PORTREVISION= 8 +PORTVERSION= 3.5p1 CATEGORIES= security ipv6 MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ ftp://ftp.op.net/pub/OpenBSD/OpenSSH/portable/ \ diff --git a/security/hpn-ssh/distinfo b/security/hpn-ssh/distinfo index 656dfe9f6dc1..17bee19d09e1 100644 --- a/security/hpn-ssh/distinfo +++ b/security/hpn-ssh/distinfo @@ -1,2 +1,2 @@ -MD5 (openssh-3.4p1.tar.gz) = 459c1d0262e939d6432f193c7a4ba8a8 +MD5 (openssh-3.5p1.tar.gz) = 42bd78508d208b55843c84dd54dea848 MD5 (openssh-3.4p1-gssapi-20020627.diff) = bd58f041a44538ab532efe261c904973 diff --git a/security/hpn-ssh/files/auth2-pam-freebsd.c b/security/hpn-ssh/files/auth2-pam-freebsd.c index f3f06ad05751..8840a61f93a7 100644 --- a/security/hpn-ssh/files/auth2-pam-freebsd.c +++ b/security/hpn-ssh/files/auth2-pam-freebsd.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$FreeBSD: /tmp/pcvs/ports/security/hpn-ssh/files/Attic/auth2-pam-freebsd.c,v 1.3 2002-07-24 20:47:22 dinoex Exp $"); +RCSID("$FreeBSD: /tmp/pcvs/ports/security/hpn-ssh/files/Attic/auth2-pam-freebsd.c,v 1.4 2002-10-17 04:40:20 dinoex Exp $"); #ifdef USE_PAM #include <security/pam_appl.h> @@ -81,27 +81,27 @@ pam_child_conv(int n, switch (msg[i]->msg_style) { case PAM_PROMPT_ECHO_OFF: buffer_put_cstring(&buffer, msg[i]->msg); - msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); - msg_recv(ctxt->pam_sock, &buffer); + ssh_msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); + ssh_msg_recv(ctxt->pam_sock, &buffer); if (buffer_get_char(&buffer) != PAM_AUTHTOK) goto fail; resp[i]->resp = buffer_get_string(&buffer, NULL); break; case PAM_PROMPT_ECHO_ON: buffer_put_cstring(&buffer, msg[i]->msg); - msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); - msg_recv(ctxt->pam_sock, &buffer); + ssh_msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); + ssh_msg_recv(ctxt->pam_sock, &buffer); if (buffer_get_char(&buffer) != PAM_AUTHTOK) goto fail; resp[i]->resp = buffer_get_string(&buffer, NULL); break; case PAM_ERROR_MSG: buffer_put_cstring(&buffer, msg[i]->msg); - msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); + ssh_msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); break; case PAM_TEXT_INFO: buffer_put_cstring(&buffer, msg[i]->msg); - msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); + ssh_msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); break; default: goto fail; @@ -144,13 +144,13 @@ pam_child(struct pam_ctxt *ctxt) if (pam_err != PAM_SUCCESS) goto auth_fail; buffer_put_cstring(&buffer, "OK"); - msg_send(ctxt->pam_sock, PAM_SUCCESS, &buffer); + ssh_msg_send(ctxt->pam_sock, PAM_SUCCESS, &buffer); buffer_free(&buffer); pam_end(pamh, pam_err); exit(0); auth_fail: buffer_put_cstring(&buffer, pam_strerror(pamh, pam_err)); - msg_send(ctxt->pam_sock, PAM_AUTH_ERR, &buffer); + ssh_msg_send(ctxt->pam_sock, PAM_AUTH_ERR, &buffer); buffer_free(&buffer); pam_end(pamh, pam_err); exit(0); @@ -224,7 +224,7 @@ pam_query(void *ctx, char **name, char **info, **prompts = NULL; plen = 0; *echo_on = xmalloc(sizeof(u_int)); - while (msg_recv(ctxt->pam_sock, &buffer) == 0) { + while (ssh_msg_recv(ctxt->pam_sock, &buffer) == 0) { type = buffer_get_char(&buffer); msg = buffer_get_string(&buffer, NULL); switch (type) { @@ -298,7 +298,7 @@ pam_respond(void *ctx, u_int num, char **resp) } buffer_init(&buffer); buffer_put_cstring(&buffer, *resp); - msg_send(ctxt->pam_sock, PAM_AUTHTOK, &buffer); + ssh_msg_send(ctxt->pam_sock, PAM_AUTHTOK, &buffer); buffer_free(&buffer); return (1); } diff --git a/security/hpn-ssh/files/patch-Makefile.in b/security/hpn-ssh/files/patch-Makefile.in index 728554f4249c..d354787aeee4 100644 --- a/security/hpn-ssh/files/patch-Makefile.in +++ b/security/hpn-ssh/files/patch-Makefile.in @@ -9,12 +9,3 @@ CONFIGFILES=sshd_config.out ssh_config.out moduli.out CONFIGFILES_IN=sshd_config ssh_config moduli -@@ -218,7 +220,7 @@ - $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8 - $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir) - $(srcdir)/mkinstalldirs $(DESTDIR)$(PRIVSEP_PATH) -- chmod 0700 $(DESTDIR)$(PRIVSEP_PATH) -+ -chmod 0700 $(DESTDIR)$(PRIVSEP_PATH) - $(INSTALL) -m 0755 -s ssh $(DESTDIR)$(bindir)/ssh - $(INSTALL) -m 0755 -s scp $(DESTDIR)$(bindir)/scp - $(INSTALL) -m 0755 -s ssh-add $(DESTDIR)$(bindir)/ssh-add diff --git a/security/hpn-ssh/files/patch-configure b/security/hpn-ssh/files/patch-configure deleted file mode 100644 index 3699c2ed52d9..000000000000 --- a/security/hpn-ssh/files/patch-configure +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.old Wed Jun 26 22:57:33 2002 -+++ configure Wed Jun 26 22:53:31 2002 -@@ -6541,6 +6541,7 @@ - #include "confdefs.h" - - #include <stdio.h> -+#include <sys/types.h> - #include <sys/mman.h> - #if !defined(MAP_ANON) && defined(MAP_ANONYMOUS) - #define MAP_ANON MAP_ANONYMOUS - diff --git a/security/hpn-ssh/files/patch-defines.h b/security/hpn-ssh/files/patch-defines.h deleted file mode 100644 index fff0463b7409..000000000000 --- a/security/hpn-ssh/files/patch-defines.h +++ /dev/null @@ -1,11 +0,0 @@ ---- defines.h.orig Tue Feb 26 17:40:49 2002 -+++ defines.h Fri Mar 8 18:51:27 2002 -@@ -146,7 +146,7 @@ - including rpc/rpc.h breaks Solaris 6 - */ - #ifndef INADDR_LOOPBACK --#define INADDR_LOOPBACK ((ulong)0x7f000001) -+#define INADDR_LOOPBACK ((u_long)0x7f000001) - #endif - - /* Types */ diff --git a/security/hpn-ssh/files/patch-session.c b/security/hpn-ssh/files/patch-session.c index 3c044d686fc6..5f9d964353dc 100644 --- a/security/hpn-ssh/files/patch-session.c +++ b/security/hpn-ssh/files/patch-session.c @@ -1,5 +1,5 @@ ---- session.c.orig Wed Jun 26 15:51:06 2002 -+++ session.c Mon Jul 1 21:33:04 2002 +--- session.c.orig Thu Sep 26 02:38:50 2002 ++++ session.c Thu Oct 17 06:31:34 2002 @@ -64,6 +64,13 @@ #define is_winnt (GetVersion() < 0x80000000) #endif @@ -14,7 +14,7 @@ /* func */ Session *session_new(void); -@@ -474,6 +481,13 @@ +@@ -469,6 +476,13 @@ log_init(__progname, options.log_level, options.log_facility, log_stderr); /* @@ -28,7 +28,7 @@ * Create a new session and process group since the 4.4BSD * setlogin() affects the entire process group. */ -@@ -572,6 +586,9 @@ +@@ -574,6 +588,9 @@ { int fdout, ptyfd, ttyfd, ptymaster; pid_t pid; @@ -38,7 +38,7 @@ if (s == NULL) fatal("do_exec_pty: no session"); -@@ -579,7 +596,16 @@ +@@ -581,7 +598,16 @@ ttyfd = s->ttyfd; #if defined(USE_PAM) @@ -56,7 +56,7 @@ do_pam_setcred(1); #endif -@@ -588,6 +614,14 @@ +@@ -591,6 +617,14 @@ /* Child. Reinitialize the log because the pid has changed. */ log_init(__progname, options.log_level, options.log_facility, log_stderr); @@ -71,7 +71,7 @@ /* Close the master side of the pseudo tty. */ close(ptyfd); -@@ -714,6 +748,18 @@ +@@ -724,6 +758,18 @@ struct sockaddr_storage from; struct passwd * pw = s->pw; pid_t pid = getpid(); @@ -90,7 +90,7 @@ /* * Get IP address of client. If the connection is not a socket, let -@@ -747,6 +793,72 @@ +@@ -757,6 +803,72 @@ } #endif @@ -163,10 +163,10 @@ if (check_quietlogin(s, command)) return; -@@ -759,7 +871,17 @@ - printf("%s\n", aixloginmsg); +@@ -770,7 +882,17 @@ #endif /* WITH_AIXAUTHENTICATE */ + #ifndef NO_SSH_LASTLOG - if (options.print_lastlog && s->last_login_time != 0) { + /* + * If the user has logged in before, display the time of last @@ -182,9 +182,9 @@ time_string = ctime(&s->last_login_time); if (strchr(time_string, '\n')) *strchr(time_string, '\n') = 0; -@@ -770,7 +892,30 @@ - s->hostname); +@@ -782,7 +904,30 @@ } + #endif /* NO_SSH_LASTLOG */ - do_motd(); +#ifdef HAVE_LOGIN_CAP @@ -214,7 +214,7 @@ } /* -@@ -786,9 +931,9 @@ +@@ -798,9 +943,9 @@ #ifdef HAVE_LOGIN_CAP f = fopen(login_getcapstr(lc, "welcome", "/etc/motd", "/etc/motd"), "r"); @@ -226,7 +226,7 @@ if (f) { while (fgets(buf, sizeof(buf), f)) fputs(buf, stdout); -@@ -815,10 +960,10 @@ +@@ -827,10 +972,10 @@ #ifdef HAVE_LOGIN_CAP if (login_getcapbool(lc, "hushlogin", 0) || stat(buf, &st) >= 0) return 1; @@ -239,7 +239,7 @@ return 0; } -@@ -938,6 +1083,10 @@ +@@ -950,6 +1095,10 @@ char buf[256]; u_int i, envsize; char **env; @@ -250,7 +250,7 @@ struct passwd *pw = s->pw; /* Initialize the environment. */ -@@ -945,6 +1094,9 @@ +@@ -957,6 +1106,9 @@ env = xmalloc(envsize * sizeof(char *)); env[0] = NULL; @@ -260,26 +260,7 @@ #ifdef HAVE_CYGWIN /* * The Windows environment contains some setting which are -@@ -958,10 +1110,6 @@ - child_set_env(&env, &envsize, "USER", pw->pw_name); - child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); - child_set_env(&env, &envsize, "HOME", pw->pw_dir); --#ifdef HAVE_LOGIN_CAP -- (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH); -- child_set_env(&env, &envsize, "PATH", getenv("PATH")); --#else /* HAVE_LOGIN_CAP */ - # ifndef HAVE_CYGWIN - /* - * There's no standard path on Windows. The path contains -@@ -976,7 +1124,6 @@ - child_set_env(&env, &envsize, "PATH", _PATH_STDPATH); - # endif /* SUPERUSER_PATH */ - # endif /* HAVE_CYGWIN */ --#endif /* HAVE_LOGIN_CAP */ - - snprintf(buf, sizeof buf, "%.200s/%.50s", - _PATH_MAILDIR, pw->pw_name); -@@ -984,9 +1131,21 @@ +@@ -998,9 +1150,21 @@ /* Normal systems set SHELL by default. */ child_set_env(&env, &envsize, "SHELL", shell); @@ -303,16 +284,16 @@ /* Set custom environment options from RSA authentication. */ if (!options.use_login) { -@@ -1174,7 +1333,7 @@ +@@ -1208,7 +1372,7 @@ setpgid(0, 0); - #endif + # endif if (setusercontext(lc, pw, pw->pw_uid, - (LOGIN_SETALL & ~LOGIN_SETPATH)) < 0) { + (LOGIN_SETALL & ~(LOGIN_SETENV|LOGIN_SETPATH))) < 0) { perror("unable to set user context"); exit(1); } -@@ -1325,7 +1484,7 @@ +@@ -1362,7 +1526,7 @@ * initgroups, because at least on Solaris 2.3 it leaves file * descriptors open. */ @@ -321,7 +302,7 @@ close(i); /* -@@ -1355,6 +1514,31 @@ +@@ -1392,6 +1556,31 @@ exit(1); #endif } diff --git a/security/openssh-portable/Makefile b/security/openssh-portable/Makefile index 6a89bf044724..b933b97199e5 100644 --- a/security/openssh-portable/Makefile +++ b/security/openssh-portable/Makefile @@ -6,8 +6,7 @@ # PORTNAME= openssh -PORTVERSION= 3.4p1 -PORTREVISION= 8 +PORTVERSION= 3.5p1 CATEGORIES= security ipv6 MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ ftp://ftp.op.net/pub/OpenBSD/OpenSSH/portable/ \ diff --git a/security/openssh-portable/distinfo b/security/openssh-portable/distinfo index 656dfe9f6dc1..17bee19d09e1 100644 --- a/security/openssh-portable/distinfo +++ b/security/openssh-portable/distinfo @@ -1,2 +1,2 @@ -MD5 (openssh-3.4p1.tar.gz) = 459c1d0262e939d6432f193c7a4ba8a8 +MD5 (openssh-3.5p1.tar.gz) = 42bd78508d208b55843c84dd54dea848 MD5 (openssh-3.4p1-gssapi-20020627.diff) = bd58f041a44538ab532efe261c904973 diff --git a/security/openssh-portable/files/auth2-pam-freebsd.c b/security/openssh-portable/files/auth2-pam-freebsd.c index 3309d307dd0a..624021171258 100644 --- a/security/openssh-portable/files/auth2-pam-freebsd.c +++ b/security/openssh-portable/files/auth2-pam-freebsd.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$FreeBSD: /tmp/pcvs/ports/security/openssh-portable/files/Attic/auth2-pam-freebsd.c,v 1.3 2002-07-24 20:47:22 dinoex Exp $"); +RCSID("$FreeBSD: /tmp/pcvs/ports/security/openssh-portable/files/Attic/auth2-pam-freebsd.c,v 1.4 2002-10-17 04:40:20 dinoex Exp $"); #ifdef USE_PAM #include <security/pam_appl.h> @@ -81,27 +81,27 @@ pam_child_conv(int n, switch (msg[i]->msg_style) { case PAM_PROMPT_ECHO_OFF: buffer_put_cstring(&buffer, msg[i]->msg); - msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); - msg_recv(ctxt->pam_sock, &buffer); + ssh_msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); + ssh_msg_recv(ctxt->pam_sock, &buffer); if (buffer_get_char(&buffer) != PAM_AUTHTOK) goto fail; resp[i]->resp = buffer_get_string(&buffer, NULL); break; case PAM_PROMPT_ECHO_ON: buffer_put_cstring(&buffer, msg[i]->msg); - msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); - msg_recv(ctxt->pam_sock, &buffer); + ssh_msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); + ssh_msg_recv(ctxt->pam_sock, &buffer); if (buffer_get_char(&buffer) != PAM_AUTHTOK) goto fail; resp[i]->resp = buffer_get_string(&buffer, NULL); break; case PAM_ERROR_MSG: buffer_put_cstring(&buffer, msg[i]->msg); - msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); + ssh_msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); break; case PAM_TEXT_INFO: buffer_put_cstring(&buffer, msg[i]->msg); - msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); + ssh_msg_send(ctxt->pam_sock, msg[i]->msg_style, &buffer); break; default: goto fail; @@ -144,13 +144,13 @@ pam_child(struct pam_ctxt *ctxt) if (pam_err != PAM_SUCCESS) goto auth_fail; buffer_put_cstring(&buffer, "OK"); - msg_send(ctxt->pam_sock, PAM_SUCCESS, &buffer); + ssh_msg_send(ctxt->pam_sock, PAM_SUCCESS, &buffer); buffer_free(&buffer); pam_end(pamh, pam_err); exit(0); auth_fail: buffer_put_cstring(&buffer, pam_strerror(pamh, pam_err)); - msg_send(ctxt->pam_sock, PAM_AUTH_ERR, &buffer); + ssh_msg_send(ctxt->pam_sock, PAM_AUTH_ERR, &buffer); buffer_free(&buffer); pam_end(pamh, pam_err); exit(0); @@ -224,7 +224,7 @@ pam_query(void *ctx, char **name, char **info, **prompts = NULL; plen = 0; *echo_on = xmalloc(sizeof(u_int)); - while (msg_recv(ctxt->pam_sock, &buffer) == 0) { + while (ssh_msg_recv(ctxt->pam_sock, &buffer) == 0) { type = buffer_get_char(&buffer); msg = buffer_get_string(&buffer, NULL); switch (type) { @@ -298,7 +298,7 @@ pam_respond(void *ctx, u_int num, char **resp) } buffer_init(&buffer); buffer_put_cstring(&buffer, *resp); - msg_send(ctxt->pam_sock, PAM_AUTHTOK, &buffer); + ssh_msg_send(ctxt->pam_sock, PAM_AUTHTOK, &buffer); buffer_free(&buffer); return (1); } diff --git a/security/openssh-portable/files/patch-Makefile.in b/security/openssh-portable/files/patch-Makefile.in index 728554f4249c..d354787aeee4 100644 --- a/security/openssh-portable/files/patch-Makefile.in +++ b/security/openssh-portable/files/patch-Makefile.in @@ -9,12 +9,3 @@ CONFIGFILES=sshd_config.out ssh_config.out moduli.out CONFIGFILES_IN=sshd_config ssh_config moduli -@@ -218,7 +220,7 @@ - $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8 - $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir) - $(srcdir)/mkinstalldirs $(DESTDIR)$(PRIVSEP_PATH) -- chmod 0700 $(DESTDIR)$(PRIVSEP_PATH) -+ -chmod 0700 $(DESTDIR)$(PRIVSEP_PATH) - $(INSTALL) -m 0755 -s ssh $(DESTDIR)$(bindir)/ssh - $(INSTALL) -m 0755 -s scp $(DESTDIR)$(bindir)/scp - $(INSTALL) -m 0755 -s ssh-add $(DESTDIR)$(bindir)/ssh-add diff --git a/security/openssh-portable/files/patch-configure b/security/openssh-portable/files/patch-configure deleted file mode 100644 index 3699c2ed52d9..000000000000 --- a/security/openssh-portable/files/patch-configure +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.old Wed Jun 26 22:57:33 2002 -+++ configure Wed Jun 26 22:53:31 2002 -@@ -6541,6 +6541,7 @@ - #include "confdefs.h" - - #include <stdio.h> -+#include <sys/types.h> - #include <sys/mman.h> - #if !defined(MAP_ANON) && defined(MAP_ANONYMOUS) - #define MAP_ANON MAP_ANONYMOUS - diff --git a/security/openssh-portable/files/patch-defines.h b/security/openssh-portable/files/patch-defines.h deleted file mode 100644 index fff0463b7409..000000000000 --- a/security/openssh-portable/files/patch-defines.h +++ /dev/null @@ -1,11 +0,0 @@ ---- defines.h.orig Tue Feb 26 17:40:49 2002 -+++ defines.h Fri Mar 8 18:51:27 2002 -@@ -146,7 +146,7 @@ - including rpc/rpc.h breaks Solaris 6 - */ - #ifndef INADDR_LOOPBACK --#define INADDR_LOOPBACK ((ulong)0x7f000001) -+#define INADDR_LOOPBACK ((u_long)0x7f000001) - #endif - - /* Types */ diff --git a/security/openssh-portable/files/patch-session.c b/security/openssh-portable/files/patch-session.c index 3c044d686fc6..5f9d964353dc 100644 --- a/security/openssh-portable/files/patch-session.c +++ b/security/openssh-portable/files/patch-session.c @@ -1,5 +1,5 @@ ---- session.c.orig Wed Jun 26 15:51:06 2002 -+++ session.c Mon Jul 1 21:33:04 2002 +--- session.c.orig Thu Sep 26 02:38:50 2002 ++++ session.c Thu Oct 17 06:31:34 2002 @@ -64,6 +64,13 @@ #define is_winnt (GetVersion() < 0x80000000) #endif @@ -14,7 +14,7 @@ /* func */ Session *session_new(void); -@@ -474,6 +481,13 @@ +@@ -469,6 +476,13 @@ log_init(__progname, options.log_level, options.log_facility, log_stderr); /* @@ -28,7 +28,7 @@ * Create a new session and process group since the 4.4BSD * setlogin() affects the entire process group. */ -@@ -572,6 +586,9 @@ +@@ -574,6 +588,9 @@ { int fdout, ptyfd, ttyfd, ptymaster; pid_t pid; @@ -38,7 +38,7 @@ if (s == NULL) fatal("do_exec_pty: no session"); -@@ -579,7 +596,16 @@ +@@ -581,7 +598,16 @@ ttyfd = s->ttyfd; #if defined(USE_PAM) @@ -56,7 +56,7 @@ do_pam_setcred(1); #endif -@@ -588,6 +614,14 @@ +@@ -591,6 +617,14 @@ /* Child. Reinitialize the log because the pid has changed. */ log_init(__progname, options.log_level, options.log_facility, log_stderr); @@ -71,7 +71,7 @@ /* Close the master side of the pseudo tty. */ close(ptyfd); -@@ -714,6 +748,18 @@ +@@ -724,6 +758,18 @@ struct sockaddr_storage from; struct passwd * pw = s->pw; pid_t pid = getpid(); @@ -90,7 +90,7 @@ /* * Get IP address of client. If the connection is not a socket, let -@@ -747,6 +793,72 @@ +@@ -757,6 +803,72 @@ } #endif @@ -163,10 +163,10 @@ if (check_quietlogin(s, command)) return; -@@ -759,7 +871,17 @@ - printf("%s\n", aixloginmsg); +@@ -770,7 +882,17 @@ #endif /* WITH_AIXAUTHENTICATE */ + #ifndef NO_SSH_LASTLOG - if (options.print_lastlog && s->last_login_time != 0) { + /* + * If the user has logged in before, display the time of last @@ -182,9 +182,9 @@ time_string = ctime(&s->last_login_time); if (strchr(time_string, '\n')) *strchr(time_string, '\n') = 0; -@@ -770,7 +892,30 @@ - s->hostname); +@@ -782,7 +904,30 @@ } + #endif /* NO_SSH_LASTLOG */ - do_motd(); +#ifdef HAVE_LOGIN_CAP @@ -214,7 +214,7 @@ } /* -@@ -786,9 +931,9 @@ +@@ -798,9 +943,9 @@ #ifdef HAVE_LOGIN_CAP f = fopen(login_getcapstr(lc, "welcome", "/etc/motd", "/etc/motd"), "r"); @@ -226,7 +226,7 @@ if (f) { while (fgets(buf, sizeof(buf), f)) fputs(buf, stdout); -@@ -815,10 +960,10 @@ +@@ -827,10 +972,10 @@ #ifdef HAVE_LOGIN_CAP if (login_getcapbool(lc, "hushlogin", 0) || stat(buf, &st) >= 0) return 1; @@ -239,7 +239,7 @@ return 0; } -@@ -938,6 +1083,10 @@ +@@ -950,6 +1095,10 @@ char buf[256]; u_int i, envsize; char **env; @@ -250,7 +250,7 @@ struct passwd *pw = s->pw; /* Initialize the environment. */ -@@ -945,6 +1094,9 @@ +@@ -957,6 +1106,9 @@ env = xmalloc(envsize * sizeof(char *)); env[0] = NULL; @@ -260,26 +260,7 @@ #ifdef HAVE_CYGWIN /* * The Windows environment contains some setting which are -@@ -958,10 +1110,6 @@ - child_set_env(&env, &envsize, "USER", pw->pw_name); - child_set_env(&env, &envsize, "LOGNAME", pw->pw_name); - child_set_env(&env, &envsize, "HOME", pw->pw_dir); --#ifdef HAVE_LOGIN_CAP -- (void) setusercontext(lc, pw, pw->pw_uid, LOGIN_SETPATH); -- child_set_env(&env, &envsize, "PATH", getenv("PATH")); --#else /* HAVE_LOGIN_CAP */ - # ifndef HAVE_CYGWIN - /* - * There's no standard path on Windows. The path contains -@@ -976,7 +1124,6 @@ - child_set_env(&env, &envsize, "PATH", _PATH_STDPATH); - # endif /* SUPERUSER_PATH */ - # endif /* HAVE_CYGWIN */ --#endif /* HAVE_LOGIN_CAP */ - - snprintf(buf, sizeof buf, "%.200s/%.50s", - _PATH_MAILDIR, pw->pw_name); -@@ -984,9 +1131,21 @@ +@@ -998,9 +1150,21 @@ /* Normal systems set SHELL by default. */ child_set_env(&env, &envsize, "SHELL", shell); @@ -303,16 +284,16 @@ /* Set custom environment options from RSA authentication. */ if (!options.use_login) { -@@ -1174,7 +1333,7 @@ +@@ -1208,7 +1372,7 @@ setpgid(0, 0); - #endif + # endif if (setusercontext(lc, pw, pw->pw_uid, - (LOGIN_SETALL & ~LOGIN_SETPATH)) < 0) { + (LOGIN_SETALL & ~(LOGIN_SETENV|LOGIN_SETPATH))) < 0) { perror("unable to set user context"); exit(1); } -@@ -1325,7 +1484,7 @@ +@@ -1362,7 +1526,7 @@ * initgroups, because at least on Solaris 2.3 it leaves file * descriptors open. */ @@ -321,7 +302,7 @@ close(i); /* -@@ -1355,6 +1514,31 @@ +@@ -1392,6 +1556,31 @@ exit(1); #endif } |