[OpenWrt-Devel] [PATCH][packages] tinyproxy: no SysLog and no logging as non root user
Christian Schoenebeck
christian.schoenebeck at gmail.com
Sat Jul 19 15:41:23 EDT 2014
From: Christian Schoenebeck <christian.schoenebeck at gmail.com>
Date: Sat, 19 Jul 2014 21:31:04 +0200
Subject: [PATCH][packages] tinyproxy: no SysLog and no logging as non root user
1.) No SysLog possible because keyword misspelled
In tinyproxy.conf and tinyproxy.config the parameter is correct spelled
with small "l"
2.) No logging as non root user
The default is that tinyproxy deamon run as nobody:nogroup, but they
have no permission to /var/log/or any other location.
So touch and change permission for logfile during startup
Signed-off-by: Christian Schoenebeck <christian.schoenebeck at gmail.com>
---
net/tinyproxy/files/tinyproxy.init | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/tinyproxy/files/tinyproxy.init b/net/tinyproxy/files/tinyproxy.init
index be7234a..73f38c6 100644
--- a/net/tinyproxy/files/tinyproxy.init
+++ b/net/tinyproxy/files/tinyproxy.init
@@ -46,7 +46,7 @@ start_proxy() {
proxy_string "$1" StatFile >> $CFGFILE
proxy_string "$1" LogFile >> $CFGFILE
- proxy_flag "$1" SysLog >> $CFGFILE
+ proxy_flag "$1" Syslog >> $CFGFILE
proxy_atom "$1" LogLevel >> $CFGFILE
@@ -111,6 +111,10 @@ proxy_string() {
config_get _value "$SECTION" "$OPTION"
[ -z "$_value" ] && _value="$DEFAULT"
[ -n "$_value" ] && echo "${ALIAS:-${OPTION}} "'"'"$_value"'"'
+ [ -n "$_value" -a "$OPTION" = "LogFile" ] && {
+ touch $_value
+ chmod 666 $_value
+ }
}
proxy_flag() {
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list