From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: Re: [PATCH v4] daemon: Set ownership of kept build directories to the calling user. Date: Sat, 24 Dec 2016 13:34:16 +0100 Message-ID: <585E6B48.3010700@crazy-compilers.com> References: <20161223133331.GA2589@jocasta.intra> <20161223221512.5926b358@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKlWq-0003K8-Pq for guix-devel@gnu.org; Sat, 24 Dec 2016 07:34:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cKlWm-0004SP-Tx for guix-devel@gnu.org; Sat, 24 Dec 2016 07:34:24 -0500 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:48823) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cKlWm-0004Rs-Ne for guix-devel@gnu.org; Sat, 24 Dec 2016 07:34:20 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3tm4Sp19v6z3hjZR for ; Sat, 24 Dec 2016 13:34:18 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3tm4Sp0G1tzvlbp for ; Sat, 24 Dec 2016 13:34:18 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id ic7FmQCD_nfR for ; Sat, 24 Dec 2016 13:34:17 +0100 (CET) Received: from hermia.goebel-consult.de (ppp-46-244-146-25.dynamic.mnet-online.de [46.244.146.25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Sat, 24 Dec 2016 13:34:17 +0100 (CET) Received: from [192.168.110.2] (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 8B377605D0 for ; Sat, 24 Dec 2016 13:34:16 +0100 (CET) In-Reply-To: <20161223221512.5926b358@scratchpost.org> 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: guix-devel Am 23.12.2016 um 22:15 schrieb Danny Milosavljevic: > Also, why use the magical value 0 for gid? Why not likewise (gid_t) -1 ? The "magic value" for gid is -1, too, as you can see in nix/nix-daemon/nix-daemon.cc. gid 0 is not used as a magic value. As you can read in the comment, the test just prohibits changing the group to "root": settings.clientGid != 0 ? settings.clientGid : -1 -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |