From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1775 Path: news.gmane.org!not-for-mail From: Justin Cormack Newsgroups: gmane.linux.lib.musl.general Subject: Re: Implementation of sys/capabilities.h Date: Mon, 27 Aug 2012 12:26:15 +0100 Message-ID: References: <71934712-6162-4358-A8DA-FAE169BE5D41@palsenberg.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1346066793 27870 80.91.229.3 (27 Aug 2012 11:26:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2012 11:26:33 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1776-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 27 13:26:34 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 1T5xSh-0007U2-7a for gllmg-musl@plane.gmane.org; Mon, 27 Aug 2012 13:26:31 +0200 Original-Received: (qmail 22075 invoked by uid 550); 27 Aug 2012 11:26:28 -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 22067 invoked from network); 27 Aug 2012 11:26:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=specialbusservice.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=PP3IVfRHnHoGEw6VGuUY81GJ9FmpB/1FyUdWLNR4sgo=; b=Eqcm8Rwg6U3yH1CD0bg1sF0g+P/gvrG5HyAPZKKZox48sWYd5uE8shodQYZn0DOfXH clQ68SNWO+S4K0S062q9Yyff1vqWfi7ZQjaFdQ+lwDC8cyvdI1aWI9qNVpU+YtAZbvvK czQ/pMdaLPbN8t617vQENT7mujLXgZ3UQTBHg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=PP3IVfRHnHoGEw6VGuUY81GJ9FmpB/1FyUdWLNR4sgo=; b=YyI7I0VMHxxAs2MbR4FZuUNg/rrzvjKRKV0KX8VXSJQ5zhy+hlmaxSipMRyXX+y4K6 Mh5kZh9Fw0D/k7DwncixFmNYTUKgdgetMWo+zoNHlENzHhfauFsHQ9Huwbx30etuAPpG Z2L8Qj6yTM5yoNxQtfS21xPD3hewD+6JEc/v7/8RTY9UKnu9xoA0qT1JdQQYuvfPLqM0 wOGa48sLK7nF9oueHUk7dZW4QRf+nyEqp4D1E/n9suiBKV13HNxoFcPO6mj2sGt0PdQN B1bLzzMT8/NiNMmfILLGiZQ2uwEz57cFC9cK1HJKQrkG/dp//xBu3b/f5vGdGRf0fvgB mlHw== In-Reply-To: X-Gm-Message-State: ALoCoQlJeH8Pv+OQtYpWjBKuWrlC3VcZUmnBdR7PPk69Z6lVTfB2XQpckzLkBME2xtl50nsJ5Bg8 Xref: news.gmane.org gmane.linux.lib.musl.general:1775 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/ > > 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. > > 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. > Definitely add the syscalls, anyway, regardless. 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. 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... Justin