On Fri, Nov 06, 2015 at 06:56:20PM +0100, Klaus Ethgen wrote: > Am Fr den 6. Nov 2015 um 16:53 schrieb Theodore Ts'o: > > In the light of that, using things like ambient capabilities, or using > > setuid binary that immediately drops all caps that it needs, is > > probably the best we're going to get. > > I do never want that! Even to think about such a way to give any shell > raised rights is horrible! And that horrible idea is it that makes all > the ambient capabilities that bad.
I sympathize with your point of view, but Christoph's use case really was a good one. A piece of system configuration software needs to do some networking setup with some privilege, including calling scripts. It can either do so as root or not at all - polluting every program that will end up getting called with fI is not only ugly but simply doesn't work (because scripts). Saying that the whole thing must be written as self-contained executable that never needs to be re-execed is frequently unrealistic. So this allows a piece of software to run with reduce privilege, and it is an improvement over the previous state of affairs. It is not intended for login shells. I would have been happy if there had been a default-off PR_ENABLE_AMBIENT prctl which required a new CAP_ENABLE_AMBIENT capability to turn on, but the current set of rules which removes bits from pA whenever doing an action which capability-aware software does something which it would have reasonably expected to drop privilege is a nice safeguard. -serge -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/