Check getcap in flatpak too
This commit is contained in:
parent
11ba5d6027
commit
31e8ba837a
@ -191,9 +191,9 @@ int gsr_kms_client_init(gsr_kms_client *self, const char *card_path) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool has_perm = 0;
|
|
||||||
const bool inside_flatpak = getenv("FLATPAK_ID") != NULL;
|
const bool inside_flatpak = getenv("FLATPAK_ID") != NULL;
|
||||||
if(!inside_flatpak) {
|
|
||||||
|
bool has_perm = 0;
|
||||||
if(geteuid() == 0) {
|
if(geteuid() == 0) {
|
||||||
has_perm = true;
|
has_perm = true;
|
||||||
} else {
|
} else {
|
||||||
@ -215,7 +215,6 @@ int gsr_kms_client_init(gsr_kms_client *self, const char *card_path) {
|
|||||||
fprintf(stderr, "gsr info: gsr_kms_client_init: failed to get cap\n");
|
fprintf(stderr, "gsr info: gsr_kms_client_init: failed to get cap\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(socketpair(AF_UNIX, SOCK_STREAM, 0, self->socket_pair) == -1) {
|
if(socketpair(AF_UNIX, SOCK_STREAM, 0, self->socket_pair) == -1) {
|
||||||
fprintf(stderr, "gsr error: gsr_kms_client_init: socketpair failed, error: %s\n", strerror(errno));
|
fprintf(stderr, "gsr error: gsr_kms_client_init: socketpair failed, error: %s\n", strerror(errno));
|
||||||
|
Loading…
Reference in New Issue
Block a user