From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20122 invoked from network); 29 May 2001 15:04:54 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 May 2001 15:04:54 -0000 Received: (qmail 19144 invoked by alias); 29 May 2001 15:04:42 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14541 Received: (qmail 19108 invoked from network); 29 May 2001 15:04:41 -0000 Date: Tue, 29 May 2001 11:04:27 -0400 From: Clint Adams To: Zefram Cc: zsh-workers@sunsite.dk, 98475-forwarded@bugs.debian.org Subject: PATCH: Re: prompt expansion and POSIX.1e capabilities Message-ID: <20010529110427.A642@dman.com> References: <20010523120514.A26393@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from zefram@fysh.org on Wed, May 23, 2001 at 11:28:51PM +0100 > It appears that the best logic to implement is, as you suggest, to > generate the "#" prompt iff the Effective set is non-empty. Another > possibility is to check both the Effective and Permitted sets; the > Permitted set is effectively `saved capabilities', with similar semantics > to saved UIDs. However, the non-capability logic doesn't look for a saved > root UID, so I think we should not be looking for Permitted capabilities. Index: Src/utils.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/utils.c,v retrieving revision 1.29 diff -u -r1.29 utils.c --- Src/utils.c 2001/05/23 08:53:12 1.29 +++ Src/utils.c 2001/05/29 14:59:00 @@ -3667,11 +3667,7 @@ cap_flag_value_t val; cap_value_t n; for(n = 0; !cap_get_flag(caps, n, CAP_EFFECTIVE, &val); n++) - if(val || - (!cap_get_flag(caps, n, CAP_INHERITABLE, &val) && val)) { - cap_free(caps); - return 1; - } + if(val) return 1; cap_free(caps); } }