[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Patch v2] daemon: Set ownership of kept build directories to the ca
From: |
Ludovic Courtès |
Subject: |
Re: [Patch v2] daemon: Set ownership of kept build directories to the calling user. |
Date: |
Sun, 27 Nov 2016 22:04:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hi!
Hartmut Goebel <address@hidden> skribis:
> Am 21.11.2016 um 15:13 schrieb Ludovic Courtès:
>> I don’t like the idea of passing those via the big ‘Settings’
>> 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ès:
>> Could we instead pass them via the ‘LocalStore’ constructor, with their
>> default values taken from ‘getuid’ and ‘getgid’ (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 ‘getuid’ and ‘getgid’,
> so there is no need to change them. Or did I miss something?
The problem is that 0 also means “root”, so I’d prefer a different value
to denote that “unset” status, -1 if you want, and explicit checks (and
a comment explaining that ‘clientUid’ and ‘clientGid’ can be either a
valid UID/GID or -1, in which case blablabla).
How does that sound?
Thanks, and sorry for the delay!
Ludo’.