Bug 51391

Summary: update-port: ftp/gftp
Product: Ports & Packages Reporter: Oliver Lehmann <lehmann>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: lehmann
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
gftp.patch none

Description Oliver Lehmann 2003-04-24 21:10:12 UTC
	make ssh2 connects working w/o the ssh-askpass utility (fix the
	code how to acquire a [pt]ty pair) The user may still choose the
	ssh-askpass way inside the application. That way is just no longer
	forced (as i did with the last update). Now it's possible to choose
	between direct password-sending from the application, or sending
	the password with the ssh-askass utility.

	bump the Portrevision

	removed files:	files/patch-lib::options.h
	new files:	files/patch-lib::misc.c
Comment 1 Oliver Lehmann 2003-04-25 01:31:02 UTC
After applying the patch, apply the following patch please:

diff -ruN gftp.old/files/patch-lib::misc.c gftp/files/patch-lib::misc.c
--- gftp.old/files/patch-lib::misc.c	Fri Apr 25 02:23:52 2003
+++ gftp/files/patch-lib::misc.c	Fri Apr 25 02:24:07 2003
@@ -1,14 +1,12 @@
---- lib/misc.c.orig	Thu Apr 24 11:54:48 2003
-+++ lib/misc.c	Thu Apr 24 11:53:00 2003
-@@ -881,7 +881,11 @@
+--- lib/misc.c.orig	Fri Dec  6 03:28:19 2002
++++ lib/misc.c	Fri Apr 25 01:51:48 2003
+@@ -881,7 +881,8 @@
        diff += rd;
        tempstr[diff] = '\0'; 
  
-+#ifdef __FreeBSD__
-+      if (strcmp (tempstr, "Password:") == 0)
-+#else
-       if (diff > 11 && strcmp (tempstr + diff - 10, "password: ") == 0)
-+#endif
+-      if (diff > 11 && strcmp (tempstr + diff - 10, "password: ") == 0)
++      if ( (strcmp (tempstr, "Password:") == 0) ||
++           (diff > 11 && strcmp (tempstr + diff - 10, "password: ") == 0) )
          {
            if (wrotepw)
              {


with that, you should get a gftp/files/patch-lib::misc.c which looks like:


root@kartoffel ftp> cat gftp/files/patch-lib::misc.c
--- lib/misc.c.orig     Fri Dec  6 03:28:19 2002
+++ lib/misc.c  Fri Apr 25 01:51:48 2003
@@ -881,7 +881,8 @@
       diff += rd;
       tempstr[diff] = '\0'; 
 
-      if (diff > 11 && strcmp (tempstr + diff - 10, "password: ") == 0)
+      if ( (strcmp (tempstr, "Password:") == 0) ||
+           (diff > 11 && strcmp (tempstr + diff - 10, "password: ") == 0) )
         {
           if (wrotepw)
             {
root@kartoffel ftp> 


That was needed because ssh Password prompts can be at least "Password: " _or_ "hostname... password: "

-- 
 Oliver Lehmann
        @home: lehmann@ans-netz.de
      @office: oliver.lehmann@mgi.de
         @www: http://www.pofo.de/  |  http://wishlist.ans-netz.de/
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2003-04-29 23:19:43 UTC
State Changed
From-To: open->closed

Commited, thanks!