tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: GPIO revisited
On Sun, Jul 19, 2009 at 4:31 PM, Marc Balmer<marc%msys.ch@localhost> wrote:
>> For (a), this is the relevant diff: (gpio.c)
>>
>> + cred = kauth_cred_get();
>> + pinset = kauth_authorize_device(cred, KAUTH_DEVICE_GPIO_PINSET,
>> + NULL, NULL, NULL, NULL) == KAUTH_RESULT_ALLOW ? 1 : 0;
>>
>> [...]
>
> There is no caching at all, kauth_authorize_device is called for every
> ioctl() call.
>
>> You authorize an action when you are performing that action.
>
> That is what the code does.
Looking at the above it seems that you call kauth_authorize_device()
once and save its return value in "piset", and then refer to the
latter when deciding if to continue or return EPERM or such. But maybe
you fixed that and forgot to upload a newer version...? :)
Thanks,
-e.
Home |
Main Index |
Thread Index |
Old Index