diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-05-19 05:36:57 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-05-19 05:36:57 +0000 |
commit | 6d8a2ce5730453558c0a8ad896c9315e4feb2b23 (patch) | |
tree | 80282670e578f14bad5db13fa132ece4b13ab730 | |
parent | f3e3c9c842a139fc962f785e812fd2118b9266b1 (diff) |
Make ftp ftp://anonymous:root@your.dom.ain@ftp.our.place.foo/pub/OpenBSD/
work. Needed for install scripts to work. I didn't run into this as
I was installing from a non-anonymous account.
-rw-r--r-- | usr.bin/ftp/fetch.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index c333d905153..1a843c31cc8 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fetch.c,v 1.11 1997/04/28 21:10:06 millert Exp $ */ +/* $OpenBSD: fetch.c,v 1.12 1997/05/19 05:36:56 millert Exp $ */ /* $NetBSD: fetch.c,v 1.8 1997/04/21 18:45:47 lukem Exp $ */ /*- @@ -38,7 +38,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: fetch.c,v 1.11 1997/04/28 21:10:06 millert Exp $"; +static char rcsid[] = "$OpenBSD: fetch.c,v 1.12 1997/05/19 05:36:56 millert Exp $"; #endif /* not lint */ /* @@ -448,7 +448,9 @@ bad_ftp_url: continue; } *pass++ = '\0'; - cp = strpbrk(pass, ":@/"); + /* XXX - assumes no '@' in pathname */ + if ((cp = strrchr(pass, '@')) == NULL) + cp = strpbrk(pass, ":@/"); if (cp == NULL || *cp == '/') { portnum = pass; pass = NULL; |