[PATCH 1/2] compositor: drop privileges if not using the drm backend

Ander Conselvan de Oliveira conselvan2 at gmail.com
Tue Jan 31 01:33:04 PST 2012


On 01/31/2012 11:04 AM, Daniel Stone wrote:
> Hi,
>
> On 30 January 2012 13:02, Ander Conselvan de Oliveira
> <ander.conselvan.de.oliveira at intel.com>  wrote:
>> +       /* Only drm-backend needs root privileges. */
>> +       if (backend)
>> +               seteuid(getuid());
>
> You should be checking seteuid's return code here.

My understanding of the man page is that this should not fail when 
setting the real user id. If it does, what can we do then, write an 
error message "failed to drop privileges"?


Ander


More information about the wayland-devel mailing list