# HG changeset patch # User masneyb # Date 1059164486 0 # Node ID b8d14c2c3097aad2aafef824e3aafe23a475ecd4 # Parent e599812712f017f9ca0febbfd5dc4bff8f72c2c2 2003-7-25 Brian Masney * lib/pty.c - prefer to use openpty() instead of grantpt() if it is available (for FreeBSD) * lib/sshv2.c - fixes for FreeBSD password prompt (from Oliver Lehmann ) * src/gtk/gftp-gtk.h src/text/gftp-text.h - added __attribute__((format(printf, 3, 4))) to logging functions (from Oliver Lehmann ) diff -r e599812712f0 -r b8d14c2c3097 ChangeLog --- a/ChangeLog Thu Jul 24 02:28:54 2003 +0000 +++ b/ChangeLog Fri Jul 25 20:21:26 2003 +0000 @@ -1,3 +1,25 @@ +2003-7-25 Brian Masney + * lib/pty.c - prefer to use openpty() instead of grantpt() if it is + available (for FreeBSD) + + * lib/sshv2.c - fixes for FreeBSD password prompt (from Oliver Lehmann + ) + + * src/gtk/gftp-gtk.h src/text/gftp-text.h - added + __attribute__((format(printf, 3, 4))) to logging functions (from + Oliver Lehmann ) + +2003-7-25 Brian Masney + * lib/pty.c - prefer to use openpty() instead of grantpt() if it is + available (for FreeBSD) + + * lib/sshv2.c - fixes for FreeBSD password prompt (from Oliver Lehmann + ) + + * src/gtk/gftp-gtk.h src/text/gftp-text.h - added + __attribute__((format(printf, 3, 4))) to logging functions (from + Oliver Lehmann ) + 2003-7-23 Brian Masney * TODO - updated @@ -1344,7 +1366,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.117 2003/07/24 02:28:48 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.118 2003/07/25 20:21:26 masneyb Exp $ tags * debian/* - updated files from Debian maintainer diff -r e599812712f0 -r b8d14c2c3097 lib/pty.c --- a/lib/pty.c Thu Jul 24 02:28:54 2003 +0000 +++ b/lib/pty.c Fri Jul 25 20:21:26 2003 +0000 @@ -59,6 +59,38 @@ return (new_fds); } +#elif HAVE_OPENPTY + +char * +gftp_get_pty_impl (void) +{ + return ("openpty"); +} + + +static int +_gftp_ptym_open (char *pts_name, size_t len, int *fds) +{ + int fdm; + + if (openpty (&fdm, fds, pts_name, NULL, NULL) < 0) + return (GFTP_ERETRYABLE); + + ioctl (*fds, TIOCSCTTY, NULL); + + return (fdm); +} + + +static int +_gftp_ptys_open (int fdm, int fds, char *pts_name) +{ + if (login_tty (fds) < 0) + return (GFTP_EFATAL); + + return (fds); +} + #elif HAVE_GRANTPT char * @@ -122,39 +154,7 @@ return (new_fds); } -#elif HAVE_OPENPTY - -char * -gftp_get_pty_impl (void) -{ - return ("openpty"); -} - - -static int -_gftp_ptym_open (char *pts_name, size_t len, int *fds) -{ - int fdm; - - if (openpty (&fdm, fds, pts_name, NULL, NULL) < 0) - return (GFTP_ERETRYABLE); - - ioctl (*fds, TIOCSCTTY, NULL); - - return (fdm); -} - - -static int -_gftp_ptys_open (int fdm, int fds, char *pts_name) -{ - if (login_tty (fds) < 0) - return (GFTP_EFATAL); - - return (fds); -} - -#else /* !HAVE_OPENPTY */ +#else /* !HAVE_GRANTPT */ /* Fall back to *BSD... */ diff -r e599812712f0 -r b8d14c2c3097 lib/sshv2.c --- a/lib/sshv2.c Thu Jul 24 02:28:54 2003 +0000 +++ b/lib/sshv2.c Fri Jul 25 20:21:26 2003 +0000 @@ -291,7 +291,8 @@ diff += rd; tempstr[diff] = '\0'; - if (diff >= 10 && strcmp (tempstr + diff - 9, "assword: ") == 0) + if ( (strcmp (tempstr, "Password:") == 0) || + (diff >= 10 && strcmp (tempstr + diff - 9, "assword: ") == 0)) { if (wrotepw) {