diff options
author | des <des@FreeBSD.org> | 2005-06-05 15:41:57 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2005-06-05 15:41:57 +0000 |
commit | c4dfc1ed3bdacd05d73791b2c8f8b580511a939f (patch) | |
tree | 08ccf47ce923e292d8f5057f36d34f042b7a5e6d /crypto/openssh/openbsd-compat | |
parent | 11a09ab416e21c995885dc0e5847151627094217 (diff) | |
download | FreeBSD-src-c4dfc1ed3bdacd05d73791b2c8f8b580511a939f.zip FreeBSD-src-c4dfc1ed3bdacd05d73791b2c8f8b580511a939f.tar.gz |
Vendor import of OpenSSH 4.1p1.
Diffstat (limited to 'crypto/openssh/openbsd-compat')
-rw-r--r-- | crypto/openssh/openbsd-compat/bsd-cygwin_util.c | 7 | ||||
-rw-r--r-- | crypto/openssh/openbsd-compat/port-aix.c | 4 | ||||
-rw-r--r-- | crypto/openssh/openbsd-compat/port-aix.h | 4 | ||||
-rw-r--r-- | crypto/openssh/openbsd-compat/readpassphrase.c | 7 |
4 files changed, 14 insertions, 8 deletions
diff --git a/crypto/openssh/openbsd-compat/bsd-cygwin_util.c b/crypto/openssh/openbsd-compat/bsd-cygwin_util.c index f53abb6..ff394ec 100644 --- a/crypto/openssh/openbsd-compat/bsd-cygwin_util.c +++ b/crypto/openssh/openbsd-compat/bsd-cygwin_util.c @@ -29,7 +29,7 @@ #include "includes.h" -RCSID("$Id: bsd-cygwin_util.c,v 1.13 2004/08/30 10:42:08 dtucker Exp $"); +RCSID("$Id: bsd-cygwin_util.c,v 1.13.4.1 2005/05/25 09:42:40 dtucker Exp $"); #ifdef HAVE_CYGWIN @@ -247,6 +247,7 @@ static struct wenv { { NL("COMMONPROGRAMFILES=") }, { NL("COMPUTERNAME=") }, { NL("COMSPEC=") }, + { NL("CYGWIN=") }, { NL("NUMBER_OF_PROCESSORS=") }, { NL("OS=") }, { NL("PATH=") }, @@ -260,7 +261,7 @@ static struct wenv { { NL("SYSTEMROOT=") }, { NL("TMP=") }, { NL("TEMP=") }, - { NL("WINDIR=") }, + { NL("WINDIR=") } }; char ** @@ -269,7 +270,7 @@ fetch_windows_environment(void) char **e, **p; int i, idx = 0; - p = xmalloc(WENV_SIZ * sizeof(char *)); + p = xmalloc((WENV_SIZ + 1) * sizeof(char *)); for (e = environ; *e != NULL; ++e) { for (i = 0; i < WENV_SIZ; ++i) { if (!strncmp(*e, wenv_arr[i].name, wenv_arr[i].namelen)) diff --git a/crypto/openssh/openbsd-compat/port-aix.c b/crypto/openssh/openbsd-compat/port-aix.c index fa6a4ff..cf5d4b9 100644 --- a/crypto/openssh/openbsd-compat/port-aix.c +++ b/crypto/openssh/openbsd-compat/port-aix.c @@ -151,7 +151,7 @@ aix_valid_authentications(const char *user) * returns 0. */ int -sys_auth_passwd(Authctxt *ctxt, const char *password, Buffer *loginmsg) +sys_auth_passwd(Authctxt *ctxt, const char *password) { char *authmsg = NULL, *msg, *name = ctxt->pw->pw_name; int authsuccess = 0, expired, reenter, result; @@ -181,7 +181,7 @@ sys_auth_passwd(Authctxt *ctxt, const char *password, Buffer *loginmsg) */ expired = passwdexpired(name, &msg); if (msg && *msg) { - buffer_append(loginmsg, msg, strlen(msg)); + buffer_append(ctxt->loginmsg, msg, strlen(msg)); aix_remove_embedded_newlines(msg); } debug3("AIX/passwdexpired returned %d msg %.100s", expired, msg); diff --git a/crypto/openssh/openbsd-compat/port-aix.h b/crypto/openssh/openbsd-compat/port-aix.h index a05ce970..9e3dce4 100644 --- a/crypto/openssh/openbsd-compat/port-aix.h +++ b/crypto/openssh/openbsd-compat/port-aix.h @@ -1,4 +1,4 @@ -/* $Id: port-aix.h,v 1.24 2005/02/16 11:49:31 dtucker Exp $ */ +/* $Id: port-aix.h,v 1.25 2005/03/21 11:46:34 dtucker Exp $ */ /* * @@ -47,7 +47,9 @@ /* These should be in the system headers but are not. */ int usrinfo(int, char *, int); +#if (HAVE_DECL_SETAUTHDB == 0) int setauthdb(const char *, char *); +#endif /* these may or may not be in the headers depending on the version */ #if (HAVE_DECL_AUTHENTICATE == 0) int authenticate(char *, char *, int *, char **); diff --git a/crypto/openssh/openbsd-compat/readpassphrase.c b/crypto/openssh/openbsd-compat/readpassphrase.c index 4ee1be5..eb060bd 100644 --- a/crypto/openssh/openbsd-compat/readpassphrase.c +++ b/crypto/openssh/openbsd-compat/readpassphrase.c @@ -137,8 +137,11 @@ restart: (void)write(output, "\n", 1); /* Restore old terminal settings and signals. */ - if (memcmp(&term, &oterm, sizeof(term)) != 0) - (void)tcsetattr(input, _T_FLUSH, &oterm); + if (memcmp(&term, &oterm, sizeof(term)) != 0) { + while (tcsetattr(input, _T_FLUSH, &oterm) == -1 && + errno == EINTR) + continue; + } (void)sigaction(SIGALRM, &savealrm, NULL); (void)sigaction(SIGHUP, &savehup, NULL); (void)sigaction(SIGINT, &saveint, NULL); |