summaryrefslogtreecommitdiffstats
path: root/ksmserver
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2019-11-27 17:57:36 +0100
committerSlávek Banko <[email protected]>2019-12-03 17:50:28 +0100
commit12561b544b3c5a04a10adb0d17fccd3347aef1ab (patch)
tree8cd2c2a6f4284f4683b602b8b7fffcee69c80470 /ksmserver
parentcbfe1940685a50d2ee10d1ad57db9ac909ded2a4 (diff)
downloadtdebase-12561b544b3c5a04a10adb0d17fccd3347aef1ab.tar.gz
tdebase-12561b544b3c5a04a10adb0d17fccd3347aef1ab.zip
ksmserver: Use the IceAuthFileName() function
instead of building the file name. This relates to bug 3027. Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit ed93cf0e084d52ca58c8a966fa9506af4484a8a9)
Diffstat (limited to 'ksmserver')
-rw-r--r--ksmserver/main.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/ksmserver/main.cpp b/ksmserver/main.cpp
index 1004c4394..977ba02e0 100644
--- a/ksmserver/main.cpp
+++ b/ksmserver/main.cpp
@@ -99,14 +99,10 @@ void sanity_check( int argc, char* argv[] )
}
if (msg.isEmpty())
{
- path = getenv("ICEAUTHORITY");
+ path = IceAuthFileName();
if (path.isEmpty())
- {
- path = getenv("HOME");
- path += "/.ICEauthority";
- }
-
- if (access(path.data(), W_OK) && (errno != ENOENT))
+ msg = "Unable to determine path for ICEauthority file.";
+ else if (access(path.data(), W_OK) && (errno != ENOENT))
msg = "No write access to '%s'.";
else if (access(path.data(), R_OK) && (errno != ENOENT))
msg = "No read access to '%s'.";