summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2012-05-19 04:30:49 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2012-05-19 04:30:49 -0700
commit641588afe92c803a1231ecf6281115f55b20e62a (patch)
treea5a80c4f0bd73c058a797a6b03eb32210630c14a
parent335937217a51e5e159a14463e0b1e3aedf35c6be (diff)
downloadxorg-app-xinit-641588afe92c803a1231ecf6281115f55b20e62a.tar.gz
laucnhd: Silence some syslog spam
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rwxr-xr-xlaunchd/privileged_startx/10-tmpdirs.cpp6
1 files changed, 3 insertions, 3 deletions
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