From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH v3] daemon: Set ownership of kept build directories to the calling user. Date: Tue, 06 Dec 2016 16:08:15 +0100 Message-ID: <87eg1lumcg.fsf@gnu.org> References: <20161201010110.2325efc9@scratchpost.org> <1480970772-30287-1-git-send-email-h.goebel@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]:60149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEHLx-0001Pr-9d for guix-devel@gnu.org; Tue, 06 Dec 2016 10:08:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEHLu-0007aJ-4F for guix-devel@gnu.org; Tue, 06 Dec 2016 10:08:21 -0500 In-Reply-To: <1480970772-30287-1-git-send-email-h.goebel@crazy-compilers.com> (Hartmut Goebel's message of "Mon, 5 Dec 2016 21:46:12 +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 Hartmut Goebel skribis: > Fixes . > > * nix/libstore/globals.hh (Settings) Add clientUid and clientGid. > * nix/nix-daemon/nix-daemon.cc (daemonLoop] Store UID and GID of the > caller in settings. > * nix/libstore/build.cc (_chown): New function. > (DerivationGoal::deleteTmpDir): Use it, change ownership of build > directory if it is kept and the new owner is not root. [...] > +static void _chown(const Path & path, uid_t uid, gid_t gid) > +{ > + checkInterrupt(); > + > + printMsg(lvlVomit, format("%1%") % path); Please remove this line (we wouldn=E2=80=99t be able to track where the mes= sage comes from). > + /* User and groud id of the client issuing the buld request. Used t= o set ^^ Typo. Also: =E2=80=A6 issuing the build request, or -1 if the UID and GID are not kno= wn. > + the owner and group of the keept temporary directories of failed ^^ Typo. If you have checked that it works as intended, please push with these changes and email the commit ID to 15890-done@debbugs.gnu.org. Thank you! Ludo=E2=80=99.