From fb717706b0eaa4f80615accd9940cb2ea9b1039f Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Mon, 25 Mar 2024 16:11:13 +0900 Subject: [PATCH] tbm_module: Do not initialize auth server if module has no master drm_fd the display server has no master drm_fd when it is launched in container environment and it connect with host display server. Change-Id: I14942c7e9a63f1b3472bdb961b08bf7fa198e40b --- src/tbm_module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tbm_module.c b/src/tbm_module.c index fe7e5a1..729daa3 100644 --- a/src/tbm_module.c +++ b/src/tbm_module.c @@ -31,6 +31,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "config.h" +#include + #include "tbm_bufmgr_int.h" #include "tbm_bufmgr_backend.h" #include "tbm_drm_helper.h" @@ -520,6 +522,10 @@ tbm_module_bind_native_display(tbm_module *module, void *native_display) TBM_INFO("tbm_module has render node."); close(fd); error = TBM_ERROR_NONE; + } else if (!drmIsMaster(fd)) { + TBM_INFO("tbm_module has no master drm_fd"); + close(fd); + error = TBM_ERROR_NONE; } else { // make the wayland server socket for sending the authenticated drm_fd to wayland clients. if (!tbm_drm_helper_wl_auth_server_init(native_display, fd, NULL, 0)) { -- 2.7.4