summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rwxr-xr-xlaunchd/privileged_startx/10-tmpdirs.cpp6
-rw-r--r--startx.cpp4
-rw-r--r--xinit.c2
4 files changed, 9 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index af8ddf3..0478a91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,7 +153,7 @@ AM_CONDITIONAL(TIGER_LAUNCHD, [test "x$TIGER_LAUNCHD" = "xyes"])
AM_CONDITIONAL(LAUNCHAGENT_XSERVER, [test "x$launchagentxserver" != "xno"])
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XINIT, x11)
+PKG_CHECK_MODULES(XINIT, x11 xproto >= 7.0.17)
case $host_os in
*bsd*)
diff --git a/launchd/privileged_startx/10-tmpdirs.cpp b/launchd/privileged_startx/10-tmpdirs.cpp
index 7786426..6ba045f 100755
--- a/launchd/privileged_startx/10-tmpdirs.cpp
+++ b/launchd/privileged_startx/10-tmpdirs.cpp
@@ -41,14 +41,14 @@ STAT=/usr/bin/stat
for dir in /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix ; do
success=0
for attempt in 1 2 3 4 5 ; do
- check=`${STAT} -f '%#p %u %g' ${dir}`
+ check=`${STAT} -f '%#p %u %g' ${dir} 2> /dev/null`
if [ "${check}" = "041777 0 0" ] ; then
success=1
break
- else
+ elif [ -n "${check}" ] ; then
saved=$(${MKTEMP} -d ${dir}-XXXXXXXX)
mv ${dir} ${saved}
- echo "${dir} exists but is insecure. It has been moved into ${saved}"
+ echo "${dir} exists but is insecure. It has been moved into ${saved}" >&2
fi
# Use mktemp rather than mkdir to avoid possible security issue
diff --git a/startx.cpp b/startx.cpp
index c92c51c..c595b84 100644
--- a/startx.cpp
+++ b/startx.cpp
@@ -126,7 +126,9 @@ if [ x`defaults read $X11_PREFS_DOMAIN nolisten_tcp` = x1 ] ; then
defaultserverargs="$defaultserverargs -nolisten tcp"
fi
-if defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then
+XCOMM The second check is the real one. The first is to hopefully avoid
+XCOMM needless syslog spamming.
+if defaults read $X11_PREFS_DOMAIN 2> /dev/null | grep -q 'dpi' && defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then
defaultserverargs="$defaultserverargs -dpi `defaults read $X11_PREFS_DOMAIN dpi`"
fi
diff --git a/xinit.c b/xinit.c
index 2ab817f..46f717a 100644
--- a/xinit.c
+++ b/xinit.c
@@ -653,6 +653,7 @@ verrorx(const char *fmt, va_list ap)
}
static void
+_X_NORETURN
Fatal(const char *fmt, ...)
{
va_list ap;
@@ -663,6 +664,7 @@ Fatal(const char *fmt, ...)
}
static void
+_X_NORETURN
Fatalx(const char *fmt, ...)
{
va_list ap;