From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27801 invoked by alias); 9 Feb 2014 16:10:52 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 27778 invoked by uid 89); 9 Feb 2014 16:10:49 -0000 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 Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 09 Feb 2014 16:10:48 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 7D2A252082E; Sun, 9 Feb 2014 17:10:45 +0100 (CET) Date: Sun, 09 Feb 2014 16:16:00 -0000 From: Corinna Vinschen 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) X-SW-Source: 2014-02/txt/msg00175.txt.bz2 --pP8l8ytKVQui4K7o Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1178 On Feb 9 08:45, Warren Young wrote: > On Feb 7, 2014, at 10:51 AM, Warren Young wrote: >=20 > > Here's a better check that doesn't give false positives: > >=20 > > $ cat < 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 < 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 Content-length: 819 -----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--