summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-cygwin_util.c7
-rw-r--r--openbsd-compat/port-aix.c4
-rw-r--r--openbsd-compat/port-aix.h4
-rw-r--r--openbsd-compat/readpassphrase.c7
4 files changed, 14 insertions, 8 deletions
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index f53abb6e2..ff394ec17 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -29,7 +29,7 @@
29 29
30#include "includes.h" 30#include "includes.h"
31 31
32RCSID("$Id: bsd-cygwin_util.c,v 1.13 2004/08/30 10:42:08 dtucker Exp $"); 32RCSID("$Id: bsd-cygwin_util.c,v 1.13.4.1 2005/05/25 09:42:40 dtucker Exp $");
33 33
34#ifdef HAVE_CYGWIN 34#ifdef HAVE_CYGWIN
35 35
@@ -247,6 +247,7 @@ static struct wenv {
247 { NL("COMMONPROGRAMFILES=") }, 247 { NL("COMMONPROGRAMFILES=") },
248 { NL("COMPUTERNAME=") }, 248 { NL("COMPUTERNAME=") },
249 { NL("COMSPEC=") }, 249 { NL("COMSPEC=") },
250 { NL("CYGWIN=") },
250 { NL("NUMBER_OF_PROCESSORS=") }, 251 { NL("NUMBER_OF_PROCESSORS=") },
251 { NL("OS=") }, 252 { NL("OS=") },
252 { NL("PATH=") }, 253 { NL("PATH=") },
@@ -260,7 +261,7 @@ static struct wenv {
260 { NL("SYSTEMROOT=") }, 261 { NL("SYSTEMROOT=") },
261 { NL("TMP=") }, 262 { NL("TMP=") },
262 { NL("TEMP=") }, 263 { NL("TEMP=") },
263 { NL("WINDIR=") }, 264 { NL("WINDIR=") }
264}; 265};
265 266
266char ** 267char **
@@ -269,7 +270,7 @@ fetch_windows_environment(void)
269 char **e, **p; 270 char **e, **p;
270 int i, idx = 0; 271 int i, idx = 0;
271 272
272 p = xmalloc(WENV_SIZ * sizeof(char *)); 273 p = xmalloc((WENV_SIZ + 1) * sizeof(char *));
273 for (e = environ; *e != NULL; ++e) { 274 for (e = environ; *e != NULL; ++e) {
274 for (i = 0; i < WENV_SIZ; ++i) { 275 for (i = 0; i < WENV_SIZ; ++i) {
275 if (!strncmp(*e, wenv_arr[i].name, wenv_arr[i].namelen)) 276 if (!strncmp(*e, wenv_arr[i].name, wenv_arr[i].namelen))
diff --git a/openbsd-compat/port-aix.c b/openbsd-compat/port-aix.c
index fa6a4ff7b..cf5d4b9a3 100644
--- a/openbsd-compat/port-aix.c
+++ b/openbsd-compat/port-aix.c
@@ -151,7 +151,7 @@ aix_valid_authentications(const char *user)
151 * returns 0. 151 * returns 0.
152 */ 152 */
153int 153int
154sys_auth_passwd(Authctxt *ctxt, const char *password, Buffer *loginmsg) 154sys_auth_passwd(Authctxt *ctxt, const char *password)
155{ 155{
156 char *authmsg = NULL, *msg, *name = ctxt->pw->pw_name; 156 char *authmsg = NULL, *msg, *name = ctxt->pw->pw_name;
157 int authsuccess = 0, expired, reenter, result; 157 int authsuccess = 0, expired, reenter, result;
@@ -181,7 +181,7 @@ sys_auth_passwd(Authctxt *ctxt, const char *password, Buffer *loginmsg)
181 */ 181 */
182 expired = passwdexpired(name, &msg); 182 expired = passwdexpired(name, &msg);
183 if (msg && *msg) { 183 if (msg && *msg) {
184 buffer_append(loginmsg, msg, strlen(msg)); 184 buffer_append(ctxt->loginmsg, msg, strlen(msg));
185 aix_remove_embedded_newlines(msg); 185 aix_remove_embedded_newlines(msg);
186 } 186 }
187 debug3("AIX/passwdexpired returned %d msg %.100s", expired, msg); 187 debug3("AIX/passwdexpired returned %d msg %.100s", expired, msg);
diff --git a/openbsd-compat/port-aix.h b/openbsd-compat/port-aix.h
index a05ce9703..9e3dce4dd 100644
--- a/openbsd-compat/port-aix.h
+++ b/openbsd-compat/port-aix.h
@@ -1,4 +1,4 @@
1/* $Id: port-aix.h,v 1.24 2005/02/16 11:49:31 dtucker Exp $ */ 1/* $Id: port-aix.h,v 1.25 2005/03/21 11:46:34 dtucker Exp $ */
2 2
3/* 3/*
4 * 4 *
@@ -47,7 +47,9 @@
47 47
48/* These should be in the system headers but are not. */ 48/* These should be in the system headers but are not. */
49int usrinfo(int, char *, int); 49int usrinfo(int, char *, int);
50#if (HAVE_DECL_SETAUTHDB == 0)
50int setauthdb(const char *, char *); 51int setauthdb(const char *, char *);
52#endif
51/* these may or may not be in the headers depending on the version */ 53/* these may or may not be in the headers depending on the version */
52#if (HAVE_DECL_AUTHENTICATE == 0) 54#if (HAVE_DECL_AUTHENTICATE == 0)
53int authenticate(char *, char *, int *, char **); 55int authenticate(char *, char *, int *, char **);
diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c
index 4ee1be5de..eb060bdbf 100644
--- a/openbsd-compat/readpassphrase.c
+++ b/openbsd-compat/readpassphrase.c
@@ -137,8 +137,11 @@ restart:
137 (void)write(output, "\n", 1); 137 (void)write(output, "\n", 1);
138 138
139 /* Restore old terminal settings and signals. */ 139 /* Restore old terminal settings and signals. */
140 if (memcmp(&term, &oterm, sizeof(term)) != 0) 140 if (memcmp(&term, &oterm, sizeof(term)) != 0) {
141 (void)tcsetattr(input, _T_FLUSH, &oterm); 141 while (tcsetattr(input, _T_FLUSH, &oterm) == -1 &&
142 errno == EINTR)
143 continue;
144 }
142 (void)sigaction(SIGALRM, &savealrm, NULL); 145 (void)sigaction(SIGALRM, &savealrm, NULL);
143 (void)sigaction(SIGHUP, &savehup, NULL); 146 (void)sigaction(SIGHUP, &savehup, NULL);
144 (void)sigaction(SIGINT, &saveint, NULL); 147 (void)sigaction(SIGINT, &saveint, NULL);