X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-10.3 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <4FEA5161.6010503@redhat.com> Date: Tue, 26 Jun 2012 18:18:41 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Paul Eggert CC: bug-gnulib , cygwin Subject: Re: [PATCH] root-uid: new module References: <4FEA4A72 DOT 8090003 AT cs DOT ucla DOT edu> <4FEA4D53 DOT 3090409 AT redhat DOT com> <4FEA4FDB DOT 5030105 AT cs DOT ucla DOT edu> In-Reply-To: <4FEA4FDB.5030105@cs.ucla.edu> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig00113B10554D298DEA045234" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enig00113B10554D298DEA045234 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable [adding cygwin] On 06/26/2012 06:12 PM, Paul Eggert wrote: > On 06/26/2012 05:01 PM, Eric Blake wrote: >> Rather than forcing comparison to a single value, would it be better to >> have a function is_privileged_uid(euid)? >=20 > Yes, that sounds better. I don't use Cygwin, though, so > I'm not qualified to write that. Broadening the question, does the cygwin community have advice on the best implementation of a function that returns true if the argument is a uid with full privileges (for example, if the uid is a member of the Administrator group, and can therefore read files in spite of chown() disabling all the read permissions)? We're trying to improve gnulib (and therefore coreutils, findutils, tar, ...) to use an implementation-appropriate check rather than the more traditional hard-coded check of uid=3D=3D0, since that doesn't quite work everywhere. --=20 Eric Blake eblake AT redhat DOT com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig00113B10554D298DEA045234 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJP6lFhAAoJEKeha0olJ0Nq5q8H/3qB0INCIaIRkJfhJdLwaHC5 lzFyy0gdZWtgpbnX0JP6K/5zy9V1XpRF8KI+V3RETccJGn3X21LKqOmcLHsy2zLz JXCA9Ia8mVZpQ/lbgk/7x4VeORdevYAy3zFrJf3QX0r/Fbr8uizISl31Wr4xISob uQd3qH4r6SrcujWBxzhlh2YSNusX9c7lB8R4kxmA1+vdUDCj82EYnXf0EZHH8oBu xe4qFHo2dU6B074L6oG+vp45tloJ2PzkLtIBBoLLCffLyb/epxITCAvi16RH1wyf 5v/Xyz0EXB3K/XdGjd+KmDQj7FnvAqT6Eb1vIHUM4usDHfpIpiihKbdou6GT4hA= =B81T -----END PGP SIGNATURE----- --------------enig00113B10554D298DEA045234--