* Thomas Zajic <[EMAIL PROTECTED]>, 29/04/2002, 00:24 > [...] As a consequence, you'll have to explicitly add "anonymous" or > "ftp" to the URL as a login name now if you want anonymous FTP to a > host listed in ~/.netrc.
Ouch. As a consequence of my own stupidity, MC would try to login as user "*netrc*" if _no_ match was found in ~/.netrc. Fixed (it will try to login as "anonymous" now). Patch attached, to be applied on top of the boxes.c patch and the two previous ftpfs.[ch] patches. Should I produce One Big Patch to clean up that mess (here's hoping that it finally works BugFree[tm] ;-)? Bye, Thomas -- =-------------------------------------------------------------------------= - Thomas "ZlatkO" Zajic <[EMAIL PROTECTED]> Linux-2.4.18 & Mutt-1.2.5.1i - - "It is not easy to cut through a human head with a hacksaw." (M. C.) - =-------------------------------------------------------------------------=
diff -ur mc-4.5.99a-orig/vfs/ftpfs.c mc-4.5.99a/vfs/ftpfs.c --- mc-4.5.99a-orig/vfs/ftpfs.c Wed May 1 14:17:55 2002 +++ mc-4.5.99a/vfs/ftpfs.c Wed May 1 14:19:05 2002 @@ -1973,8 +1973,12 @@ rupp->host = g_strdup (host); rupp->login = rupp->pass = 0; - if (*login != NULL) + if (*login != NULL) { + if (!strncmp(*login, "*netrc*", 7)) + /* no match in ~/.netrc, try anonymous */ + *login = g_strdup("anonymous"); rupp->login = g_strdup (*login); + } if (*pass != NULL) rupp->pass = g_strdup (*pass); rupp->next = rup_cache;
msg00701/pgp00000.pgp
Description: PGP signature