Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: What makes %# tick?
- X-seq: zsh-users 11142
- From: Tim Haynes <zsh@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: What makes %# tick?
- Date: 23 Jan 2007 15:11:24 +0000
- In-reply-to: <20070123143906.146ce338.pws@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Original-sender: zsh@xxxxxxxxxxxxxxxxxxxxxxx
- References: <86lkjurkpa.fsf@xxxxxxxxxxxxxxxxxxxxxxx> <20070123143906.146ce338.pws@xxxxxxx>
- Reply-to: Tim Haynes <zsh@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Sender: Tim Haynes <piglet@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Peter Stephenson <pws@xxxxxxx> writes:
> Tim Haynes <zsh@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > | zsh, sauce 12:15PM piglet/ # id
> > | uid=1000(piglet) gid=1000(piglet)
> > | groups=10(wheel),16(cron),18(audio),19(cdrom),250(portage),1000(piglet)
> > | zsh, sauce 12:15PM piglet/ #
> > ^oops.
> >
> > I'm running zsh-4.2.5 on an amd64 box (gentoo linux) and am rather
> > attached to my %# prompt specifier.
>
> The test of %# uses the function privasserted which is commented thus:
>
> /* Check whether the shell is running with privileges in effect. *
> * This is the case if EITHER the euid is zero, OR (if the system *
> * supports POSIX.1e (POSIX.6) capability sets) the process' *
> * Effective or Inheritable capability sets are non-empty. */
>
> I'm not sure what this feature gains in practice but it's possible your
> realtime module means that there is something in the capability sets and
> the shell therefore thinks that you are an enchanced lifeform.
:) Yes, I remember reading about capabilities in this stuff to do with
jackd. Sounds likely.
> There is a workaround. The shell allows you to test for a particular
> effective UID, and in this case there's no funny business about
> capability sets. You can make this otherwise mimic the behaviour of "%#"
> by replacing that with "%(#.#.%%)".
That works perfectly. Thank ye greatly!
Cheers,
~Tim
--
Ideologies come, ideologies go |zsh@xxxxxxxxxxxxxxxxxxxxxxxxxx
A waste of words, and endless flow |http://pig.sty.nu/Pictures/gallery/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author