From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1776 Path: news.gmane.org!not-for-mail From: Igmar Palsenberg Newsgroups: gmane.linux.lib.musl.general Subject: Re: Implementation of sys/capabilities.h Date: Mon, 27 Aug 2012 13:38:24 +0200 Message-ID: <5F4BDD82-ACF6-4478-839D-170497496F7D@palsenberg.com> References: <71934712-6162-4358-A8DA-FAE169BE5D41@palsenberg.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1346067518 1435 80.91.229.3 (27 Aug 2012 11:38:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2012 11:38:38 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1777-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 27 13:38:39 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 1T5xeR-0004Qu-6H for gllmg-musl@plane.gmane.org; Mon, 27 Aug 2012 13:38:39 +0200 Original-Received: (qmail 29933 invoked by uid 550); 27 Aug 2012 11:38:37 -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 29925 invoked from network); 27 Aug 2012 11:38:36 -0000 In-Reply-To: X-Mailer: Apple Mail (2.1486) Xref: news.gmane.org gmane.linux.lib.musl.general:1776 Archived-At: > On Mon, Aug 27, 2012 at 11:23 AM, Igmar Palsenberg = wrote: >>> Why in Musl out of interest? They are not in other libc's, and = people >>> expect to link to libcap for them surely. And some people argue that >>> the interfaces are not very well designed (indeed libcap seems to be >>> adding extra ones not in the withdrawn posix draft), eg see >>> http://people.redhat.com/sgrubb/libcap-ng/ >>=20 >> It's open for debate. The syscalls need to be there (including the = structs the kernel uses), and I've got those in a patch. >>=20 >> I agree the interface is shit : Way to complicated, while only need = some simple functions, with a bitmap to represent them. Why implement it = ? >> It's the only thing we got, and programs assume it's POSIX, so it = should be present. Yes, it's broken, but capabilities are a needed = feature if you ask me. >>=20 >=20 > Definitely add the syscalls, anyway, regardless. I'll submit a patch for that. Rich, can you handle pull request, or you = want the patch on the ML ? > I am just not sure that "programs assume it's POSIX, so it should be > present", I would assume they would expect to have to link against > external libcap, which would be an explicit dependency, not assumed > part of libc. They are part of the draft POSIX 1e, but it is only a > suggestion and not a standard, and really needed more work. >=20 > It is a difficult one, as the kernel API is a bit unpleasant. But > including a partial implementation is asking for trouble too. Perhaps > another option is a posix 1e companion library that implements the > other parts? Not sure... I prefer the kernel API over libcap any time. Kernel is one header = struct (2 fields), and a struct with 3 bitfields. Can't get any easier = if you ask me. I'll submit a patch for the kernel ABI, the rest if I look at it again, = doesn't belong in musl. Igmar