From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IrBVb-00038k-VH for garchives@archives.gentoo.org; Sun, 11 Nov 2007 12:01:48 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.2/8.14.0) with SMTP id lABC03PE022638; Sun, 11 Nov 2007 12:00:03 GMT Received: from mo-p07-ob.rzone.de (mo-p07-ob.rzone.de [81.169.146.188]) by robin.gentoo.org (8.14.2/8.14.0) with ESMTP id lABBwEvI019710 for ; Sun, 11 Nov 2007 11:58:14 GMT Received: from localhost (u-5-132.vpn.RWTH-Aachen.DE [137.226.101.132]) by post.webmailer.de (fruni mo57) (RZmta 14.0) with ESMTP id w02251jAB9D06c for ; Sun, 11 Nov 2007 12:58:12 +0100 (MET) (envelope-from: ) Date: Sun, 11 Nov 2007 12:58:19 +0100 From: Christian Faulhammer To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] Re: eselect_zenity: alpha eselect GUI Message-ID: <20071111125819.5151a9ab@gentoo.org> In-Reply-To: References: <20071108104813.GI5516@supernova> <20071108105454.1844a75c@blueyonder.co.uk> <20071108120742.GK5516@supernova> <20071108124333.2a3dfdc7@blueyonder.co.uk> <20071108183450.15b4a7bb@blueyonder.co.uk> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.1; i686-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/_ECNAhc5V7aZv=jOCaSq6S_"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-RZG-AUTH: hXn+rC1arvT7Lf9I/zKDqjrgIkrokD1Qxy5bIqfbp9I10BMNL35Kum+fVbT8+ijLtsxAGXOyrmg= X-RZG-CLASS-ID: mo07 X-Archives-Salt: 4fb40482-04d9-4147-9570-894138e1f8e6 X-Archives-Hash: ed84cfa6cd85e8f1794d8b22a389c0ca --Sig_/_ECNAhc5V7aZv=jOCaSq6S_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Steve Long : > Ciaran McCreesh wrote: > > Steve Long wrote: > >> I've always used EUID for the root check, eg: > > Which is just as bad. > No, it's better for the reason given: it doesn't require login as > root. Use of ((EUID)) is also quicker. Capabilites are the write access to the target you want to modify in your eselect module: test_for_root() { # checks if the user has rights to modify /usr/bin/ [[ -w "${ROOT}/usr/bin" ]] || die -q "You need to be root!" } That's how the the vim and Emacs eselect modules do it. In my opinion the best way to check for the rights needed. V-Li --=20 Christian Faulhammer, Gentoo Lisp project , #gentoo-lisp on FreeNode --Sig_/_ECNAhc5V7aZv=jOCaSq6S_ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHNu5bNQqtfCuFneMRAq6GAJwM4rqY816fhARaUKJZiXHPGbUgRACeJ45M hsphamCnVIW75jM2SaQGYRA= =zFUv -----END PGP SIGNATURE----- --Sig_/_ECNAhc5V7aZv=jOCaSq6S_-- -- gentoo-dev@gentoo.org mailing list