bug-hurd
[Top][All Lists]
Advanced

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

ftpfs


From: Hugues LARRIVE
Subject: ftpfs
Date: Thu, 16 Jun 2005 04:20:20 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1

Hello,

My hosting provider gives user names containing a @. ftpfs doesn't work
with URL like ftp://login@myhost:password@hostname, because it considers
that the hostname starts after the first @.

Although @ is a reserved caracter in the URLs according to RFC3986, I
think supporting those non-standard login is harmless and useful (at
least, it is for me).

Here is the patch I use. It works fine for me and a few of the HurdFR team.

2005-06-14  Hugues Larrive  <hugues.larrive@gmail.com>

   * ftpfs.c (parse_startup_opt): User names may contain a @, so take the
   last @ of FTPFS_REMOTE_FS.
   * host.c (split_server_name): User names may contain a @, so take the
   last @ of P.

diff -Nurp hurd-orig/ftpfs/ftpfs.c hurd/ftpfs/ftpfs.c
--- hurd-orig/ftpfs/ftpfs.c     2002-05-13 19:39:37.000000000 +0200
+++ hurd/ftpfs/ftpfs.c  2005-06-14 14:42:33.000000000 +0200
@@ -255,7 +255,7 @@ parse_startup_opt (int key, char *arg, s
       {
         int h_err;            /* Host lookup error.  */
         error_t err;
-         char *sep = strchr (ftpfs_remote_fs, '@');
+         char *sep = strrchr (ftpfs_remote_fs, '@');

         if (sep)
           /* FTPFS_REMOTE_FS includes a '@', which means that it's in
diff -Nurp hurd-orig/ftpfs/host.c hurd/ftpfs/host.c
--- hurd-orig/ftpfs/host.c      1997-08-07 05:06:20.000000000 +0200
+++ hurd/ftpfs/host.c   2005-06-14 14:43:24.000000000 +0200
@@ -38,7 +38,7 @@ split_server_name (const char *server, c

/* Extract the hostname; syntax is either `HOST:...', `...@HOST', or just
     HOST if there are no user parameters specified.  */
-  sep = strchr (p, '@');
+  sep = strrchr (p, '@');
  if (sep)
    /* ...@HOST */
    {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]