aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/ddxLoad.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-12 19:43:36 +0000
committermarha <marha@users.sourceforge.net>2009-10-12 19:43:36 +0000
commit821ad28aad2f8c3cf4bbef9c8ac053943603cc67 (patch)
tree741a72dab536c86c7c3d815d93574d1404b42a51 /xorg-server/xkb/ddxLoad.c
parentf18b881b547c558dca584d68d45ace998fa49d18 (diff)
parent0c5e1ab504b4e8c56974a234bd440e9fa2f1f941 (diff)
downloadvcxsrv-821ad28aad2f8c3cf4bbef9c8ac053943603cc67.tar.gz
vcxsrv-821ad28aad2f8c3cf4bbef9c8ac053943603cc67.tar.bz2
vcxsrv-821ad28aad2f8c3cf4bbef9c8ac053943603cc67.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/xkb/ddxLoad.c')
-rw-r--r--xorg-server/xkb/ddxLoad.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c
index b098e01e5..3c98b8de7 100644
--- a/xorg-server/xkb/ddxLoad.c
+++ b/xorg-server/xkb/ddxLoad.c
@@ -158,10 +158,9 @@ OutputDirectory(
size_t size)
{
#ifndef WIN32
- if (getuid() == 0 && (strlen(XKM_OUTPUT_DIR) < size))
+ /* Can we write an xkm and then open it too? */
+ if (access(XKM_OUTPUT_DIR, W_OK | X_OK) == 0 && (strlen(XKM_OUTPUT_DIR) < size))
{
- /* if server running as root it *may* be able to write */
- /* FIXME: check whether directory is writable at all */
(void) strcpy (outdir, XKM_OUTPUT_DIR);
} else
#else