mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 22:50:27 +01:00
Revert "weston: Drop priviledges early, and seteuid when needed"
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.
This commit is contained in:
parent
f7968296c6
commit
0f0dd81107
1 changed files with 0 additions and 6 deletions
|
|
@ -20,8 +20,6 @@
|
|||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -441,7 +439,6 @@ evdev_input_device_create(struct evdev_input *master,
|
|||
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)
|
||||
|
|
@ -459,10 +456,7 @@ evdev_input_device_create(struct evdev_input *master,
|
|||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue