Steve Long <[EMAIL PROTECTED]>: > Ciaran McCreesh wrote: > > Steve Long <[EMAIL PROTECTED]> 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 -- Christian Faulhammer, Gentoo Lisp project <URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode <URL:http://www.faulhammer.org/>
signature.asc
Description: PGP signature