From ddeb9733fb4eccc2dc8bd36633db7b34a7ba3627 Mon Sep 17 00:00:00 2001 From: "Alfred M. Szmidt" Date: Sat, 18 Jun 2005 17:18:13 +0000 Subject: 2005-06-14 Hugues Larrive * 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. --- ftpfs/ChangeLog | 7 +++++++ ftpfs/ftpfs.c | 2 +- ftpfs/host.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ftpfs/ChangeLog b/ftpfs/ChangeLog index b53da74f..4f042123 100644 --- a/ftpfs/ChangeLog +++ b/ftpfs/ChangeLog @@ -1,3 +1,10 @@ +2005-06-14 Hugues Larrive + + * 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. + 2003-08-17 Marcus Brinkmann * ftpfs.h: Include . diff --git a/ftpfs/ftpfs.c b/ftpfs/ftpfs.c index 492df79e..09c072d1 100644 --- a/ftpfs/ftpfs.c +++ b/ftpfs/ftpfs.c @@ -255,7 +255,7 @@ parse_startup_opt (int key, char *arg, struct argp_state *state) { 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 --git a/ftpfs/host.c b/ftpfs/host.c index a0703afe..cd6fd4c0 100644 --- a/ftpfs/host.c +++ b/ftpfs/host.c @@ -38,7 +38,7 @@ split_server_name (const char *server, char **host, char **user, char **passwd) /* 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 */ { -- cgit v1.2.3