Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Re: prompt expansion and POSIX.1e capabilities



> 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