On 23 April 2018 at 17:19, Philip Guenther <guent...@gmail.com> wrote:
> On Mon, Apr 23, 2018 at 4:53 PM, Rudolf Sykora <rudolf.syk...@gmail.com>
> wrote:
>>
>> I expected that
>>
>> doas id -ru
>>
>> would return my uid.
>>
>> But it returns 0 (ie root)
>>
>> Can anybody comment on it?
>
>
> Hmm, what led you to expect it to return your UID?
>
> doas, like su, sets both the effective and real UID to the target user's;
> running something with doas is not the same as making it setuid and running
> it.  Running with effective!=real can trip up programs that didn't expect
> it, so it not a safe choice for something like doas.

Aha. Thanks for the explanation!
I thought it's more like setuid...
Sorry.

Ruda

Reply via email to