Accepting request 89126 from Base:System

- Wrap touch command with correct umask (bnc#725875) 

- Help the bash by using TMPDIR=/run to avoid trouble with the
  temporary files used for here-documents (bnc#724610)

OBS-URL: https://build.opensuse.org/request/show/89126
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/syslogd?expand=0&rev=57
This commit is contained in:
Stephan Kulow
2011-10-24 10:37:57 +00:00
committed by Git OBS Bridge
2 changed files with 28 additions and 3 deletions

View File

@@ -18,6 +18,9 @@
# #
umask 0022 umask 0022
TMPDIR=/run
export TMPDIR
: ${SBINDIR:=/sbin} : ${SBINDIR:=/sbin}
: ${RUN_PATH:=/run/systemd} : ${RUN_PATH:=/run/systemd}
@@ -53,6 +56,17 @@ if test -z "$SYSLOG_DAEMON" -o ! -x "$SBINDIR/$SYSLOG_DAEMON" ; then
done done
fi fi
#
# Simple helper for correct permissions of the socket
#
touch ()
{
local mask=$(umask)
umask 0066
/bin/touch ${1+"$@"}
umask $mask
}
# #
# Default is no network and start klogd # Default is no network and start klogd
# #
@@ -91,7 +105,7 @@ syslog-ng)
done < $config done < $config
fi fi
/bin/mkdir -p -m 0755 ${socksdir#/var} /bin/mkdir -p -m 0755 ${socksdir#/var}
/bin/touch -m 0600 ${socks#/var} touch ${socks#/var}
params="$SYSLOG_NG_PARAMS" params="$SYSLOG_NG_PARAMS"
;; ;;
rsyslogd) rsyslogd)
@@ -129,7 +143,7 @@ rsyslogd)
done < $config done < $config
fi fi
/bin/mkdir -p -m 0755 ${socksdir#/var} /bin/mkdir -p -m 0755 ${socksdir#/var}
/bin/touch -m 0600 ${socks#/var} touch ${socks#/var}
compat=${RSYSLOGD_COMPAT_VERSION:-${RSYSLOGD_NATIVE_VERSION}} compat=${RSYSLOGD_COMPAT_VERSION:-${RSYSLOGD_NATIVE_VERSION}}
params="-c ${compat:-3} -f $config $RSYSLOGD_PARAMS" params="-c ${compat:-3} -f $config $RSYSLOGD_PARAMS"
;; ;;
@@ -145,7 +159,7 @@ rsyslogd)
done < ${config} done < ${config}
fi fi
/bin/mkdir -p -m 0755 ${socksdir#/var} /bin/mkdir -p -m 0755 ${socksdir#/var}
/bin/touch -m 0600 ${socks#/var} touch ${socks#/var}
params="$SYSLOGD_PARAMS" params="$SYSLOGD_PARAMS"
esac esac

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Oct 24 08:29:15 UTC 2011 - werner@suse.de
- Wrap touch command with correct umask (bnc#725875)
-------------------------------------------------------------------
Fri Oct 21 09:15:14 UTC 2011 - werner@suse.de
- Help the bash by using TMPDIR=/run to avoid trouble with the
temporary files used for here-documents (bnc#724610)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Sep 20 08:38:55 UTC 2011 - werner@suse.de Tue Sep 20 08:38:55 UTC 2011 - werner@suse.de