Module Name:    src
Committed By:   christos
Date:           Sun Aug 16 02:49:23 UTC 2009

Modified Files:
        src/usr.bin/ftp: fetch.c

Log Message:
use strrchr to find the last @ because we might want the username to contain
u...@domain.


To generate a diff of this commit:
cvs rdiff -u -r1.189 -r1.190 src/usr.bin/ftp/fetch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/ftp/fetch.c
diff -u src/usr.bin/ftp/fetch.c:1.189 src/usr.bin/ftp/fetch.c:1.190
--- src/usr.bin/ftp/fetch.c:1.189	Thu Aug 13 13:55:18 2009
+++ src/usr.bin/ftp/fetch.c	Sat Aug 15 22:49:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fetch.c,v 1.189 2009/08/13 17:55:18 drochner Exp $	*/
+/*	$NetBSD: fetch.c,v 1.190 2009/08/16 02:49:23 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: fetch.c,v 1.189 2009/08/13 17:55:18 drochner Exp $");
+__RCSID("$NetBSD: fetch.c,v 1.190 2009/08/16 02:49:23 christos Exp $");
 #endif /* not lint */
 
 /*
@@ -374,7 +374,7 @@
 		*path = ftp_strdup(ep);
 	}
 
-	cp = strchr(thost, '@');	/* look for user[:pass]@ in URLs */
+	cp = strrchr(thost, '@');	/* look for user[:pass]@ in URLs */
 	if (cp != NULL) {
 		if (*utype == FTP_URL_T)
 			anonftp = 0;	/* disable anonftp */

Reply via email to