zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.dk
Cc: 98475-forwarded@bugs.debian.org
Subject: prompt expansion and POSIX.1e capabilities
Date: Wed, 23 May 2001 12:05:14 -0400	[thread overview]
Message-ID: <20010523120514.A26393@dman.com> (raw)

I know nothing about these things.

----- Forwarded message from Galen Hancock <galen@CSUA.Berkeley.EDU> -----

Package: zsh
Version: 4.0.0+4.0.1.pre4-3

The default PS1 is "%m%# ". zsh conforms to the part of its man page,
under PROMPT EXPANSION, which says:

       %#     A  `#'  if  the shell is running with privileges, a
              `%' if not.  Equivalent to `%(!.#.%%)'.  The  defi­
              nition of `privileged', for these purposes, is that
              either the  effective  user  ID  is  zero,  or,  if
              POSIX.1e  capabilities are supported, that at least
              one capability is raised in either the Effective or
              Inheritable capability vectors.

This is not useful behavior, because (at least on my installation),
normal users have all capabilities but cap_setpcap raised inheritable.
This gives me a # prompt, not %, when I log in.

soda% ssh gh.dhs.org
[... normal user logon]
windriver# zsh --version
zsh 4.0.1-pre-4+debian0515 (i686-pc-linux-gnu)
windriver# zmodload zsh/cap
windriver# id
uid=1000(galen) gid=1000(galen) groups=1000(galen),24(cdrom),25(floppy),29(audio),33(www-data),37(operator),40(src),44(video),50(staff),60(games),101(dba),500(wheel),2000(mp3)
windriver# cap
=i cap_setpcap-i
windriver# cap =
windriver% cap
=
windriver% uname -sr
Linux 2.2.15

The format in which capabilites are printed is documented in
cap_from_text(3). = means no capabilites raised, and "=i cap_setpcap-i"
means, first, all capabilities raised in inheritable and, then,
cap_setpcap turned off in inheritable.

I don't know much about capabilites, so I don't know for sure what a more
reasonable setting would be; I think "at least one capability raised in
'effective'" would make sense.

					Galen


             reply	other threads:[~2001-05-23 16:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-23 16:05 Clint Adams [this message]
2001-05-23 22:28 ` Zefram
2001-05-29 15:04   ` PATCH: " Clint Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010523120514.A26393@dman.com \
    --to=schizo@debian.org \
    --cc=98475-forwarded@bugs.debian.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).