Mercurial > gftp.yaz
changeset 232:b8d14c2c3097
2003-7-25 Brian Masney <masneyb@gftp.org>
* 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
<oliver@FreeBSD.ORG>)
* src/gtk/gftp-gtk.h src/text/gftp-text.h - added
__attribute__((format(printf, 3, 4))) to logging functions (from
Oliver Lehmann <oliver@FreeBSD.ORG>)
author | masneyb |
---|---|
date | Fri, 25 Jul 2003 20:21:26 +0000 |
parents | e599812712f0 |
children | a5205627a66f |
files | ChangeLog lib/pty.c lib/sshv2.c |
diffstat | 3 files changed, 58 insertions(+), 35 deletions(-) [+] |
line wrap: on
line diff
--- 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 <masneyb@gftp.org> + * 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 + <oliver@FreeBSD.ORG>) + + * src/gtk/gftp-gtk.h src/text/gftp-text.h - added + __attribute__((format(printf, 3, 4))) to logging functions (from + Oliver Lehmann <oliver@FreeBSD.ORG>) + +2003-7-25 Brian Masney <masneyb@gftp.org> + * 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 + <oliver@FreeBSD.ORG>) + + * src/gtk/gftp-gtk.h src/text/gftp-text.h - added + __attribute__((format(printf, 3, 4))) to logging functions (from + Oliver Lehmann <oliver@FreeBSD.ORG>) + 2003-7-23 Brian Masney <masneyb@gftp.org> * 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
--- 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... */
--- 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) {