[patch] ftpfs specifying password for "ftp" & "anonymous" accounts



Hi,

this patch makes ftp:mypassword server work as expected (logs as "ftp" with password "mypassword"). Currently mc uses always the default mail address as a password for ftp or anonymous, regardless of the password specified after a colon.

--
Jindrich Makovicka
Index: ftpfs.c
===================================================================
RCS file: /cvsroot/mc/mc/vfs/ftpfs.c,v
retrieving revision 1.154
diff -u -b -B -r1.154 ftpfs.c
--- ftpfs.c	29 Oct 2003 17:23:36 -0000	1.154
+++ ftpfs.c	2 Nov 2003 12:46:19 -0000
@@ -418,7 +418,7 @@
     if (netrcpass)
 	op = g_strdup (netrcpass);
     else {
-	if (!strcmp (SUP.user, "anonymous") || !strcmp (SUP.user, "ftp")) {
+	if ((!strcmp (SUP.user, "anonymous") || !strcmp (SUP.user, "ftp")) && !SUP.password) {
 	    if (!ftpfs_anonymous_passwd)
 		ftpfs_init_passwd ();
 	    op = g_strdup (ftpfs_anonymous_passwd);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]