From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [Patch v2] daemon: Set ownership of kept build directories to the calling user. Date: Sun, 27 Nov 2016 22:04:49 +0100 Message-ID: <87inr8ljm6.fsf@gnu.org> References: <1479382225-25227-1-git-send-email-h.goebel@crazy-compilers.com> <87shqkvs3a.fsf@gnu.org> <58330253.60805@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cB6d7-0004yN-42 for guix-devel@gnu.org; Sun, 27 Nov 2016 16:04:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cB6d3-0004qn-S8 for guix-devel@gnu.org; Sun, 27 Nov 2016 16:04:57 -0500 In-Reply-To: <58330253.60805@crazy-compilers.com> (Hartmut Goebel's message of "Mon, 21 Nov 2016 15:18:59 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel@gnu.org Hi! Hartmut Goebel skribis: > Am 21.11.2016 um 15:13 schrieb Ludovic Court=C3=A8s: >> I don=E2=80=99t like the idea of passing those via the big =E2=80=98Sett= ings=E2=80=99 >> singleton. > > Well, the Settings are already used to pass options like --keep-going to > the build process. So the "Singleton" is mutable per-process anyway. > This is why I've put these here, too. Good point. This and your other message have convinced me! > Am 21.11.2016 um 15:13 schrieb Ludovic Court=C3=A8s: >> Could we instead pass them via the =E2=80=98LocalStore=E2=80=99 construc= tor, with their >> default values taken from =E2=80=98getuid=E2=80=99 and =E2=80=98getgid= =E2=80=99 (rather than 0)? WDYT? > > Regarding the default values: I'm using zero as "not set" marker here. > The files will already have owner and group from =E2=80=98getuid=E2=80=99= and =E2=80=98getgid=E2=80=99, > so there is no need to change them. Or did I miss something? The problem is that 0 also means =E2=80=9Croot=E2=80=9D, so I=E2=80=99d pre= fer a different value to denote that =E2=80=9Cunset=E2=80=9D status, -1 if you want, and explicit= checks (and a comment explaining that =E2=80=98clientUid=E2=80=99 and =E2=80=98clientGi= d=E2=80=99 can be either a valid UID/GID or -1, in which case blablabla). How does that sound? Thanks, and sorry for the delay! Ludo=E2=80=99.