From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1837 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: capset() capget() syscalls Date: Wed, 5 Sep 2012 23:41:46 -0400 Message-ID: <20120906034146.GB27715@brightrain.aerifal.cx> References: <20120905061905.GQ27715@brightrain.aerifal.cx> <50471B56.8040804@palsenberg.com> <20120905142441.GT27715@brightrain.aerifal.cx> <20120906030406.GY27715@brightrain.aerifal.cx> <5048141C.5030503@barfooze.de> <20120906032013.GA27715@brightrain.aerifal.cx> <20120906032811.GA45295@intma.in> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1346902765 15905 80.91.229.3 (6 Sep 2012 03:39:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Sep 2012 03:39:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1838-gllmg-musl=m.gmane.org@lists.openwall.com Thu Sep 06 05:39:27 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T9Sw9-0006Uy-48 for gllmg-musl@plane.gmane.org; Thu, 06 Sep 2012 05:39:25 +0200 Original-Received: (qmail 24500 invoked by uid 550); 6 Sep 2012 03:39:22 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 24492 invoked from network); 6 Sep 2012 03:39:22 -0000 Content-Disposition: inline In-Reply-To: <20120906032811.GA45295@intma.in> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1837 Archived-At: On Wed, Sep 05, 2012 at 11:28:11PM -0400, Kurt H Maier wrote: > On Wed, Sep 05, 2012 at 11:20:13PM -0400, Rich Felker wrote: > > > > Thanks for the input, but I don't think it's quite that clear-cut and > > I don't have a good answer. There should be some way to access > > capabilities without needing an ugly library which allocates dynamic > > memory to report the current capability set (yes, libcap is THAT bad), > > but the sys/capabilities.h interfaces are also a complete mess... > > > > Why not replace libcap instead of doing this in musl? That's kind of the direction I was thinking. And the "portable" (to all known Linux libcs) way to do this would be using and SYS_capset/SYS_capget to implement such a library, rather than having special-case code to do X on glibc and Y on musl... Alternatively, if the kernel and glibc folks could agree (or at least the glibc folks), we could develop a new sane API for exposing capabilities from libc instead of with a third-party library. Rich