Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jul 2010 09:29:45 +0000
From:      Jens Rehsack <rehsack@googlemail.com>
To:        Ashish SHUKLA <ashish@freebsd.org>
Cc:        Dan Nelson <dnelson@allantgroup.com>, freebsd-questions@freebsd.org
Subject:   Re: getpwent bug?
Message-ID:  <4C402689.7070005@netbsd.org>
In-Reply-To: <8639vjrdru.fsf@chateau.d.if>
References:  <AANLkTin5RGYfu_Xt5HWxKFO8GMTOi3YWQ8dyr95ZDW-Y@mail.gmail.com>	<20100715172615.GC5485@dan.emsphone.com> <86tyo0qd19.fsf@chateau.d.if>	<20100716043056.GF5485@dan.emsphone.com>	<AANLkTilSum3vumQhv4qtOQhCaSHo832Ub3b9bEhP0zSt@mail.gmail.com>	<86d3unrfgu.fsf@chateau.d.if> <4C401B31.4000402@netbsd.org> <8639vjrdru.fsf@chateau.d.if>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/16/10 09:12, Ashish SHUKLA wrote:
> Jens Rehsack writes:
>
> [...]
>
>> I cached the entires - I rate setpwent as to dangerous.
>
> dangerous ? why ?

Because it modifies something - and I might not know the source.
getpwent(3) delivers entries from yp, too (or LDAP) etc. - and
when I call setpwent(3) for such an entry, what happens then?

Long explanation for: I do not know the consequences - and that's
why I rate it dangerous as workaround.

Jens



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