Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Feb 2011 23:52:58 -0800
From:      Doug Barton <dougb@FreeBSD.org>
To:        flz@FreeBSD.org, freebsd-ports@FreeBSD.org
Subject:   pkg_info -g not working for unprivileged user + unreadable files
Message-ID:  <4D4FA4DA.608@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
flz,

In r206043 you converted fexists() in src/lib/libpkg/file.c to use 
open() instead of lstat(). Unfortunately this has the side effect of 
breaking 'pkg_info -g' for unprivileged users with files that have no +r 
bits. For example:

pkg_info -g sudo-1.7.4.6
Information for sudo-1.7.4.6:

Mismatched Checksums:
pkg_info: /usr/local/bin/sudo doesn't exist
pkg_info: /usr/local/bin/sudoedit doesn't exist
pkg_info: /usr/local/bin/sudoreplay doesn't exist
pkg_info: /usr/local/sbin/visudo doesn't exist

Reverting your change produces the expected behavior. So my questions 
are, why was the change made, what are its benefits, and how can we fix 
this problem?  :)


Thanks,

Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D4FA4DA.608>