From dab7047113c4ad4ffead944d5c4ebfb648c1d0b0 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sun, 1 May 2022 15:46:31 -0400 Subject: [PATCH] Fix file dialog not appearing on snap build Fix #7607 - Don't disable core dumps when building for snap distribution. Doing so will not allow the xdg-desktop-portal from opening the file dialog. This is because the portal attempts to call entries from /proc/[pid]/xxxx which are restricted to root when core dumps are disabled. --- src/core/Bootstrap.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/Bootstrap.cpp b/src/core/Bootstrap.cpp index e01bf7337..aa359a29b 100644 --- a/src/core/Bootstrap.cpp +++ b/src/core/Bootstrap.cpp @@ -89,7 +89,9 @@ namespace Bootstrap success = success && (setrlimit(RLIMIT_CORE, &limit) == 0); #endif -#if defined(HAVE_PR_SET_DUMPABLE) +// NOTE: Dumps cannot be disabled for snap builds as it prevents desktop portals from working +// See https://github.com/keepassxreboot/keepassxc/issues/7607#issuecomment-1109005206 +#if defined(HAVE_PR_SET_DUMPABLE) && !defined(KEEPASSXC_DIST_SNAP) success = success && (prctl(PR_SET_DUMPABLE, 0) == 0); #endif