From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753927AbbIJODL (ORCPT ); Thu, 10 Sep 2015 10:03:11 -0400 Received: from h2.hallyn.com ([78.46.35.8]:41379 "EHLO h2.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753088AbbIJODJ (ORCPT ); Thu, 10 Sep 2015 10:03:09 -0400 Date: Thu, 10 Sep 2015 09:03:08 -0500 From: "Serge E. Hallyn" To: "Serge E. Hallyn" Cc: David Drysdale , "Eric W. Biederman" , Andy Lutomirski , "linux-kernel@vger.kernel.org" Subject: Re: RFC: fsyscall Message-ID: <20150910140308.GA28113@mail.hallyn.com> References: <874mj4o7yd.fsf@x220.int.ebiederm.org> <8737yomrwm.fsf@x220.int.ebiederm.org> <87mvwwfngy.fsf@x220.int.ebiederm.org> <20150910134350.GC27602@mail.hallyn.com> <20150910140120.GA28071@mail.hallyn.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150910140120.GA28071@mail.hallyn.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2015 at 09:01:20AM -0500, Serge E. Hallyn wrote: > On Thu, Sep 10, 2015 at 02:51:28PM +0100, David Drysdale wrote: > > On Thu, Sep 10, 2015 at 2:43 PM, Serge E. Hallyn wrote: > > > On Tue, Sep 08, 2015 at 07:25:17PM -0500, Eric W. Biederman wrote: > > >> Andy Lutomirski writes: > > >> > > >> > On Tue, Sep 8, 2015 at 4:07 PM, Eric W. Biederman wrote: > > >> > > >> >> Perhaps I had missed it but I don't recall capsicum being able to wrap > > >> >> things like reboot(2). > > >> >> > > >> > > > >> > Ah, so you want to be able to grant BPF-defined capabilities :) > > >> > > >> Pretty much. > > >> > > >> Where I am focusing is turning Posix capabilities into real > > >> capabilities. I would not mind if the functionality was a bit more > > >> general. Say to be able to handle things like security labels, or > > >> anywhere else you might reasonably be asked can you do X? > > >> > > >> But I would be happy if we just managed to wrap the Posix capabilities > > >> and turned them into real capablilities. > > > > > > If there were a clever way to exec an open fd, then you could do this > > > > execveat(fd, "", argv, envp, AT_EMPTY_PATH) ? > > ??? I looked for it but I don't have a manpage for it. I see it at > man7.org though. Thanks :) But this isn't quite what I was suggesting. I was suggesting a call which would exec the fd, not exec a file inside the dirfd.