From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: [PATCH v3] daemon: Set ownership of kept build directories to the calling user. Date: Tue, 6 Dec 2016 21:41:33 +0100 Message-ID: <20161206214133.407bd710@scratchpost.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=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEMYY-0000sv-Li for guix-devel@gnu.org; Tue, 06 Dec 2016 15:41:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEMYS-0002Di-S2 for guix-devel@gnu.org; Tue, 06 Dec 2016 15:41:42 -0500 Received: from dd1012.kasserver.com ([85.13.128.8]:37552) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cEMYS-0002D2-Lu for guix-devel@gnu.org; Tue, 06 Dec 2016 15:41:36 -0500 In-Reply-To: <1480970772-30287-1-git-send-email-h.goebel@crazy-compilers.com> 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, > +#if defined(SO_PEERCRED) ... > +#else > + /* Setting these to -1 means: do not change */ > + settings.clientUid = -1; > + settings.clientGid = -1; > +#endif I think you also have to cast them there, so settings.clientUid = (uid_t) -1; settings.clientGid = (gid_t) -1; The reason is because (-1) is a signed integer and clientUid isn't - and neither is clientGid.