This reverts commit
fc6ccb868fa735ee9c6592806f381aa1262bf0b2.
We still need root permissions for drmDrop/SetMaster. Without
integration with ConsoleKit or systemd we also don't have access
to /dev/dri/cardX in the case where we open a new VT.
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define _GNU_SOURCE
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct evdev_input_device *device;
struct wl_event_loop *loop;
struct weston_compositor *ec;
- uid_t saved_uid, uid, euid;
device = malloc(sizeof *device);
if (device == NULL)
device->rel.dx = 0;
device->rel.dy = 0;
- getresuid(&uid, &euid, &saved_uid);
- seteuid(saved_uid);
device->fd = open(path, O_RDONLY);
- seteuid(euid);
if (device->fd < 0)
goto err0;