Old bug in pwcache functions. Calling setpassent(1) to keep the passwd
database open is a surprising abstraction violation for the caller of
user_from_uid. Now it has a file descriptor it must close before exec by
calling endpwent(), but this fact is not mentioned. (find is affected
On Mon, Oct 26, 2015 at 6:47 AM, Ted Unangst <t...@tedunangst.com> wrote:
> Old bug in pwcache functions. Calling setpassent(1) to keep the passwd
> database open is a surprising abstraction violation for the caller of
> user_from_uid. Now it has a file descriptor it must cl
On Mon, 26 Oct 2015 11:39:48 -0400, "Ted Unangst" wrote:
> This improves the cache. Basically, it's kind of like four way
> associative now, with LRU replacement. Also we can cache nameless
> entries instead of going back to getpwuid every time.
Shouldn't those memcpy() be memmove()?
- todd
Todd C. Miller wrote:
> On Mon, 26 Oct 2015 11:39:48 -0400, "Ted Unangst" wrote:
>
> > This improves the cache. Basically, it's kind of like four way
> > associative now, with LRU replacement. Also we can cache nameless
> > entries instead of going back to getpwuid every time.
>
> Shouldn't
Philip Guenther wrote:
> On Mon, Oct 26, 2015 at 6:47 AM, Ted Unangst <t...@tedunangst.com> wrote:
> > Old bug in pwcache functions. Calling setpassent(1) to keep the passwd
> > database open is a surprising abstraction violation for the caller of
> > user_from_uid. N
On Mon, 26 Oct 2015 09:19:20 -0700, Philip Guenther wrote:
> Ah, I missed fixing that before. How's this?
Looks fine to me, though I wonder whether other systems leak the fd.
- todd
On Mon, 26 Oct 2015 12:07:33 -0400, "Ted Unangst" wrote:
> Todd C. Miller wrote:
> > On Mon, 26 Oct 2015 11:39:48 -0400, "Ted Unangst" wrote:
> >
> > > This improves the cache. Basically, it's kind of like four way
> > > associative now, with LRU replacement. Also we can cache nameless
> > >
On Mon, Oct 26, 2015 at 9:05 AM, Ted Unangst <t...@tedunangst.com> wrote:
> Philip Guenther wrote:
>> On Mon, Oct 26, 2015 at 6:47 AM, Ted Unangst <t...@tedunangst.com> wrote:
>> > Old bug in pwcache functions. Calling setpassent(1) to keep the passwd
>> > da