From bca61d04bed6b8249fc90ea1e59b02695d5a4ca5 Mon Sep 17 00:00:00 2001 From: bapt Date: Fri, 3 Mar 2017 12:51:16 +0000 Subject: [PATCH] Properly initialize netrcfd in fetchParseURL This fixes ftp with fetch(1) which was broken after r313974 Submitted by: dim Reported by: olivier Pointyhat to: bapt --- lib/libfetch/fetch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c index 6b3148ebe27f..dd6b98f04bbd 100644 --- a/lib/libfetch/fetch.c +++ b/lib/libfetch/fetch.c @@ -350,6 +350,7 @@ fetchParseURL(const char *URL) fetch_syserr(); return (NULL); } + u->netrcfd = -2; /* scheme name */ if ((p = strstr(URL, ":/"))) {