Re: check capabilities in open()

Vasiliy Kulikov
2010-07-25T09:23:54Z

On Sun, Jul 25, 2010 at 09:45 +0400, Vasiliy Kulikov wrote:
> Btw, the list of such drivers is much smaller, some of them just return
> -EPERM and open() fails, it is OK. I'll resend more precise list soon.

The list is tiny:

arch/x86/kernel/apm_32.c
drivers/char/agp/frontend.c
drivers/char/apm-emulation.c

Aslo comment from drivers/cahr/apm-emulation.c:

/*
* XXX - this is a tiny bit broken, when we consider BSD
* process accounting. If the device is opened by root, we
* instantly flag that we used superuser privs. Who knows,
* we might close the device immediately without doing a
* privileged operation -- cevans
*/