[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: |
Hartmut Goebel |
Subject: |
Re: [Patch v2] daemon: Set ownership of kept build directories to the calling user. |
Date: |
Mon, 5 Dec 2016 21:51:51 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 |
Am 01.12.2016 um 01:01 schrieb Danny Milosavljevic:
> So I'd say to compare with (uid_t)-1 would be fine
>
> if (settings.clientUid != (uid_t) -1) {
> ...
> }
Thanks for this tip, Danny. This made it work and I just posted the
updated patch.
> > And casting uid_t to unisgned int might return the same uid as "nobody".
> [...]
>
> (-1) in two-complement 16 bit integral encoding (which is technically not
> guaranteed to be used in C) would be 65535.
Ahh, well, yes. I'm not quite good on bit operations, esp. on
representations of negative numbers. Thanks to doing this right.
--
Regards
Hartmut Goebel
| Hartmut Goebel | address@hidden |
| www.crazy-compilers.com | compilers which you thought are impossible |
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Patch v2] daemon: Set ownership of kept build directories to the calling user.,
Hartmut Goebel <=