From 927c64cc6e2ff8a545cac1881071ffb9ed2c36bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 2 Dec 2019 23:24:31 +0100 Subject: Process the new location of the ICEauthority file + our internal implementation of IceAuthFileName tests whether the ICEauthority file exists in the folder specified by the XDG_RUNTIME_DIR variable + DCOP client tests whether the ICEauthority file for a specific user exists in the user's folder based on the XDG_RUNTIME_DIR variable + tdeinit uses the IceAuthFileName() function instead of building the file name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This relates to bug 3027. Signed-off-by: Slávek Banko (cherry picked from commit 38b2b0be7840d868c21093a406ab98a646212de1) --- kinit/CMakeLists.txt | 2 +- kinit/kinit.cpp | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'kinit') diff --git a/kinit/CMakeLists.txt b/kinit/CMakeLists.txt index 16acb7678..19b96494c 100644 --- a/kinit/CMakeLists.txt +++ b/kinit/CMakeLists.txt @@ -40,7 +40,7 @@ set( ${target}_SRCS tde_add_executable( ${target} SOURCES ${${target}_SRCS} - LINK ltdlc-static kparts-shared ${XFT_LIBRARIES} + LINK kICE-static ltdlc-static kparts-shared ${XFT_LIBRARIES} DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index dfb7eeb6b..82f5c2aa5 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -59,6 +59,7 @@ #include #include #include +#include #ifdef HAVE_SYS_PRCTL_H #include @@ -852,12 +853,7 @@ static void init_kdeinit_socket() exit(255); } } - path = getenv("ICEAUTHORITY"); - if (path.isEmpty()) - { - path = home_dir; - path += "/.ICEauthority"; - } + path = IceAuthFileName(); if (access(path.data(), R_OK|W_OK) && (errno != ENOENT)) { fprintf(stderr, "[kinit] Aborting. No write access to '%s'.\n", path.data()); -- cgit v1.2.1