all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Darrington <john@darrington.wattle.id.au>
To: Vincent Legoll <vincent.legoll@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH v4] daemon: Set ownership of kept build directories to the calling user.
Date: Fri, 23 Dec 2016 14:33:31 +0100	[thread overview]
Message-ID: <20161223133331.GA2589@jocasta.intra> (raw)
In-Reply-To: <CAEwRq=pJO6Y=sQPhuA4xAE2HJ0uYi-RUfdKL72gVPPjP1C-8+w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

On Fri, Dec 23, 2016 at 12:18:11PM +0100, Vincent Legoll wrote:
     Hello,
     
     +            // Change the ownership if clientUid is set. Never change the
     +            // ownership or the group to "root" for security reasons.
     +            if (settings.clientUid != (uid_t) -1 && settings.clientUid != 0) {
     
     Is "0" a magical value that don't need casting or am I missing something ?
     
Presumably clientUid is an unsigned integral type.  Hence -1 does need a cast, whereas
0 does not.

J'

-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2016-12-23 13:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23 11:18 [PATCH v4] daemon: Set ownership of kept build directories to the calling user Vincent Legoll
2016-12-23 13:33 ` John Darrington [this message]
2016-12-23 21:15   ` Danny Milosavljevic
2016-12-24 12:34     ` Hartmut Goebel
2016-12-25 23:34       ` Danny Milosavljevic
  -- strict thread matches above, loose matches on Subject: below --
2016-12-08 12:12 [PATCH v3] " Hartmut Goebel
2016-12-08 12:14 ` [PATCH v4] " Hartmut Goebel
2016-12-09 14:23   ` Ludovic Courtès
2016-12-09 14:47     ` Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161223133331.GA2589@jocasta.intra \
    --to=john@darrington.wattle.id.au \
    --cc=guix-devel@gnu.org \
    --cc=vincent.legoll@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.