Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: prompt expansion and POSIX.1e capabilities
- X-seq: zsh-workers 14541
- From: Clint Adams <clint@xxxxxxx>
- To: Zefram <zefram@xxxxxxxx>
- Subject: PATCH: Re: prompt expansion and POSIX.1e capabilities
- Date: Tue, 29 May 2001 11:04:27 -0400
- Cc: zsh-workers@xxxxxxxxxx, 98475-forwarded@xxxxxxxxxxxxxxx
- In-reply-to: <E152h7b-0007Ae-00@xxxxxxxxxxxxxxxxxx>; from zefram@xxxxxxxx on Wed, May 23, 2001 at 11:28:51PM +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010523120514.A26393@xxxxxxxx> <E152h7b-0007Ae-00@xxxxxxxxxxxxxxxxxx>
> 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);
}
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author