launcher-direct: warn when opening devices non-root
Warn the user that this is not supposed to work. Developers who know what they are doing know to ignore this message, others should think twice. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
4e9f4d0474
commit
2d738b856d
|
@ -232,6 +232,12 @@ launcher_direct_open(struct weston_launcher *launcher_base, const char *path, in
|
|||
if (fd == -1)
|
||||
return -1;
|
||||
|
||||
if (geteuid() != 0) {
|
||||
weston_log("WARNING! Succeeded opening %s as non-root user."
|
||||
" This implies your device can be spied on.\n",
|
||||
path);
|
||||
}
|
||||
|
||||
if (fstat(fd, &s) == -1) {
|
||||
close(fd);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue