aboutsummaryrefslogtreecommitdiff
path: root/backend/session
diff options
context:
space:
mode:
Diffstat (limited to 'backend/session')
-rw-r--r--backend/session/direct-ipc.c18
-rw-r--r--backend/session/meson.build20
2 files changed, 0 insertions, 38 deletions
diff --git a/backend/session/direct-ipc.c b/backend/session/direct-ipc.c
index 42ca00e1..94f34a88 100644
--- a/backend/session/direct-ipc.c
+++ b/backend/session/direct-ipc.c
@@ -24,23 +24,6 @@
enum { DRM_MAJOR = 226 };
-#if WLR_HAS_LIBCAP
-#include <sys/capability.h>
-
-static bool have_permissions(void) {
- cap_t cap = cap_get_proc();
- cap_flag_value_t val;
-
- if (!cap || cap_get_flag(cap, CAP_SYS_ADMIN, CAP_PERMITTED, &val) || val != CAP_SET) {
- wlr_log(WLR_ERROR, "Do not have CAP_SYS_ADMIN; cannot become DRM master");
- cap_free(cap);
- return false;
- }
-
- cap_free(cap);
- return true;
-}
-#else
static bool have_permissions(void) {
#ifdef __linux__
if (geteuid() != 0) {
@@ -50,7 +33,6 @@ static bool have_permissions(void) {
#endif
return true;
}
-#endif
static void send_msg(int sock, int fd, void *buf, size_t buf_len) {
char control[CMSG_SPACE(sizeof(fd))] = {0};
diff --git a/backend/session/meson.build b/backend/session/meson.build
index 65e4595d..81ff6d85 100644
--- a/backend/session/meson.build
+++ b/backend/session/meson.build
@@ -62,23 +62,3 @@ if logind_found
wlr_files += files('logind.c')
wlr_deps += logind
endif
-
-# libcap
-
-msg = []
-if get_option('libcap').enabled()
- msg += 'Install "libcap" or pass "-Dlibcap=disabled".'
-endif
-if not get_option('libcap').disabled()
- msg += 'Required for POSIX capability support (Not needed if using logind).'
-endif
-
-libcap = dependency('libcap',
- required: get_option('libcap'),
- not_found_message: '\n'.join(msg),
-)
-if libcap.found()
- conf_data.set10('WLR_HAS_LIBCAP', true)
- wlr_deps += libcap
-endif
-