delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/09/11:11:09

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT cygwin DOT com>
To: cygwin AT cygwin DOT 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 AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <52F339CA DOT 5070305 AT gmail DOT com> <20140206090117 DOT GD2821 AT calimero DOT vinschen DOT de> <52F361C5 DOT 3000807 AT gmail DOT com> <20140206141321 DOT GI2821 AT calimero DOT vinschen DOT de> <52F40208 DOT 5030901 AT etr-usa DOT com> <20140207094917 DOT GN2821 AT calimero DOT vinschen DOT de> <52F4E540 DOT 2010606 AT tiscali DOT co DOT uk> <52F51D19 DOT 6080807 AT etr-usa DOT com> <31347914-BB4F-4039-984B-731B6C72F903 AT etr-usa DOT com>
MIME-Version: 1.0
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 AT etr-usa DOT 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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019