X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=deP+FjlvBCUvZy8wEgIQXxT/dhDs618/MJMrxRq4eTH/M2jT/7FUw
	+R7gmRPNlnPXU+gLrH1eRRBYBFwIjVoQYaTP4jFxPodMh0Hm829wxOiPJxew9Lpn
	XuF+cZ9lIAPYJ3bpgyWly98QItFT5q8HPzvMF2IhoabnqeBACFT8G0=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=ZTDePEt6baZtOl4J2fdcCPOLza0=; b=b7dX/i4edhMhDzkjMQyxS5vW/OUg
	jHCXEpcZbdtTv09BO+lOoleMS8ia6jUztJDaOxH1XmQfdveYyGZLaPlCX1LDk3Ov
	6q6iGXLb5doXcBfNUyyNB997veliltTOXuT4hBo7UfLWxZZ/0Okg0A9FAO06LSgO
	fSCgrYEePuI6//w=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Sun, 9 Feb 2014 17:10:45 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: get rid of getpwent? (Was: cygwin-1.7.28 getpwent header declaration changes ?)
Message-ID: <20140209161045.GC2821@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <52F339CA.5070305@gmail.com> <20140206090117.GD2821@calimero.vinschen.de> <52F361C5.3000807@gmail.com> <20140206141321.GI2821@calimero.vinschen.de> <52F40208.5030901@etr-usa.com> <20140207094917.GN2821@calimero.vinschen.de> <52F4E540.2010606@tiscali.co.uk> <52F51D19.6080807@etr-usa.com> <31347914-BB4F-4039-984B-731B6C72F903@etr-usa.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;	protocol="application/pgp-signature"; boundary="pP8l8ytKVQui4K7o"
Content-Disposition: inline
In-Reply-To: <31347914-BB4F-4039-984B-731B6C72F903@etr-usa.com>
User-Agent: Mutt/1.5.21 (2010-09-15)

--pP8l8ytKVQui4K7o
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Feb  9 08:45, Warren Young wrote:
> On Feb 7, 2014, at 10:51 AM, Warren Young <warren@etr-usa.com> wrote:
>=20
> > Here's a better check that doesn't give false positives:
> >=20
> >    $ cat <<END > checkfile
> >    #!/bin/sh
> >    if egrep -q '_getgrent(32|64)' "$1" ; then echo $1 ; fi
> >    END
> >    $ find /bin -name \*.exe -exec ./checkfile {} \;
>=20
> The strings(1) call got left out of that test.  Here=E2=80=99s a working =
variant, which tests for getpwent() calls instead:
>=20
>     $ cat <<END > checkfile
>     if strings "$1" | egrep -q '^getpwent$' ; then echo $1 ; fi
>     END
>     $ find /bin -name \*.exe -exec sh checkfile {} \;
>=20
> Alas, Vim *does* call this API.  Results:

It does so to evaluate a ~user in a path and I guess that's what other
apps do as well.  This is kind of weird since it would obviously not be
necessary to enumerate accounts for this functionality:

  if (~ in path)
    if (~ is solo)
      getpwuid(getuid ())
    else
      getpwname (username after the ~);


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--pP8l8ytKVQui4K7o
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJS96iFAAoJEPU2Bp2uRE+g9m4QAIuDMDzx5sOk9NFAGBMN6hKU
k5NPpZXTqpzYaVouGz5zBqeohJjyWZFnvthgFZqMnjyCfKj96alQOG+ioAfV9uMm
4+NU8IIMAI0iSG9pMpguO9aItLcUTq5zn9S7aJ++CSDot5wpjTUGI8XX3teKg8u+
R8XmtF2pIFZFflT3MzdOjuQw2NtFlXgzv9fFG9kVMC1oYMp+FiHRe7LmWf7tp79S
z5TB2yi/2ybBMXgVDje24WVHoV2DKrfPj/UWhFMUdN78zPb+DpV2I2hLmhu9anVD
RcV5FN0jfMwjQxdPfCwbIz2QrkYz770n/Mj5rQ5ok/b57rTu8dZOCQnycki6yI1c
mQCpV0So+6qJ918KK6OuGEf2jezQmxASMpHYVMbbIRV2n6T8rARw1G9OQ5E4NwyZ
S9qoUCP+KbRa70zG25QekO3qjHKruXvjh281vfNehx2obtanYvnYxIPqZlbzA4Ag
Ypiz2FusUP14B4bxaipa3pOXNt621+As5Ehn5Hk/hSyX+24JQ/15MuGyYinAnBTB
4tKm5vH+MziBB3SzzJfWHrA3o/WJcw33ZeDniXn8m8oE4HbdCI2qfzUqiaj6YJSc
Pi+5rScalJjKlnZyBMeNENgnMB2VhU02pkdGkOGFhWyGM8BMXFTb7s27W4cV/SIK
zm3UiPnmJVc1tILOFJ+l
=NrAU
-----END PGP SIGNATURE-----

--pP8l8ytKVQui4K7o--
