Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD 11.99.1 installation procedure issue
On Mon, 4 Aug 2025, RVP wrote:
Looks like pkg_add relies on a bozohttpd-like dir. listing. It should do
something like a basename(3) on the `href' links.
Actually, it is[1], but, fetchList(3) is filtering out any links which contain
a `/' --see [2]. (Code added here[3].)
This patch should fix this issue, I think:
```
diff -urN src/external/bsd/fetch.orig/dist/libfetch/common.c src/external/bsd/fetch/dist/libfetch/common.c
--- src/external/bsd/fetch.orig/dist/libfetch/common.c 2024-02-03 01:51:49.790786629 +0000
+++ src/external/bsd/fetch/dist/libfetch/common.c 2025-08-07 07:17:39.107637144 +0000
@@ -839,8 +839,7 @@
size_t base_doc_len, name_len, i;
unsigned char c;
- if (strchr(name, '/') != NULL ||
- strcmp(name, "..") == 0 ||
+ if (strcmp(name, "..") == 0 ||
strcmp(name, ".") == 0)
return 0;
```
-RVP
[1]: https://github.com/NetBSD/src/blob/trunk/external/bsd/pkg_install/dist/lib/pkg_io.c#L271
[2]: https://github.com/NetBSD/src/blob/trunk/external/bsd/fetch/dist/libfetch/common.c#L842
[3]: https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/libfetch/files/common.c.diff?r1=1.7;r2=1.8;f=h
Home |
Main Index |
Thread Index |
Old Index