svn commit: r206043 - in head/usr.sbin/pkg_install: add delete
lib version
Garrett Cooper
yanefbsd at gmail.com
Sat Apr 3 11:32:20 UTC 2010
On Thu, Apr 1, 2010 at 5:12 PM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Thu, Apr 01, 2010 at 05:02:34PM -0700, Garrett Cooper wrote:
>> 1. FILENAME_MAX could be less than PATH_MAX, and actually is on
>> the BSDs (256 vs 1024). PATH_MAX allows for duplicate slashes and all
>> sorts of whacky path crud and probably should be used more liberally
>> in the pkg_install code. This however isn't always true in the NetBSD
>> case because they're aiming for portability of pkg_install, however
>> PATH_MAX is always guaranteed to be at least as large as FILENAME_MAX.
>
> Well, I've been slowly working on eliminating the use of PATH_MAX in the
> NetBSD/pkgsrc version of pkg_install. The performance gain from using
> fixed stack space is minimal and the error handling generally
> incompletely at best.
>
> Joerg
Hi Joerg!
I'm sorry but I'm a little bit confused by this statement: do you
mean that you're replacing PATH_MAX sized buffers to FILENAME_MAX
sized buffers? If so this may cause an issue because several of the
variables used in constructing the file paths in pkg_install aren't
necessarily correct in overflow cases. We need to avoid introducing
potential functional flaws with filename truncation like this.
I appreciate the work that you've done on the new version of
pkg_install -- hopefully we can cross-pollinate some useful pieces
with pkg_install in the near future.
Thanks,
-Garrett
More information about the svn-src-all
mailing list