Re: Account in FTP
- From: Lorinczy Zsigmond <lzsiga mail ahiv hu>
- To: mc-devel gnome org
- Subject: Re: Account in FTP
- Date: Fri, 14 Mar 2003 16:59:38 +0100
Pavel Roskin wrote:
>
> Hello!
>
> > My BS2000 mainframe wants account when connecting via FTP,
> > (332 Account required.) but mc do not prompts the user for it.
> > I think I could add this feature if this could be useful
> > for someone else too...
>
> Yes, it shouldn't be too much code. See login_server() in vfs/ftpfs.c:
>
> if (command (me, super, WAIT_REPLY, "PASS %s", pass) != COMPLETE)
> break;
>
> Add check for CONTINUE at this point and send the account.
Well I happened to hack something, could someone please check it?
Lorinczy, Zsigmond
--- ftpfs.bak Thu Dec 26 03:21:43 2002
+++ ftpfs.c Fri Mar 14 16:58:08 2003
@@ -469,7 +469,21 @@
switch (code){
case CONTINUE:
print_vfs_message (_("ftpfs: sending user password"));
- if (command (me, super, WAIT_REPLY, "PASS %s", pass) != COMPLETE)
+ code= command (me, super, WAIT_REPLY, "PASS %s", pass);
+ if (code==CONTINUE) {
+ char *p;
+
+ p = g_strconcat (_(" FTP: Account required for "), SUP.user,
+ " ", NULL);
+ op = input_dialog (p, _("Account:"), "");
+ g_free (p);
+ if (op == NULL)
+ ERRNOR (EPERM, 0);
+ print_vfs_message (_("ftpfs: sending user account"));
+ code= command (me, super, WAIT_REPLY, "ACCT %s", op);
+ g_free (op);
+ }
+ if (code != COMPLETE)
break;
case COMPLETE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]