From 641588afe92c803a1231ecf6281115f55b20e62a Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Sat, 19 May 2012 04:30:49 -0700 Subject: laucnhd: Silence some syslog spam Signed-off-by: Jeremy Huddleston --- launchd/privileged_startx/10-tmpdirs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'launchd/privileged_startx') 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 -- cgit v1.2.3