From: "peter.mueller@ipfire.org" peter.mueller@ipfire.org
Fixes #12220
Reported-by: Michael Tremer michael.tremer@ipfire.org Signed-off-by: Peter Müller peter.mueller@ipfire.org Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org --- lfs/tor | 2 +- src/paks/tor/install.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lfs/tor b/lfs/tor index ea07f6ce2..178f84be9 100644 --- a/lfs/tor +++ b/lfs/tor @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = tor -PAK_VER = 43 +PAK_VER = 44
DEPS = "libseccomp"
diff --git a/src/paks/tor/install.sh b/src/paks/tor/install.sh index 4d0353155..369b65f71 100644 --- a/src/paks/tor/install.sh +++ b/src/paks/tor/install.sh @@ -36,10 +36,10 @@ extract_files restore_backup ${NAME}
# Adjust some folder permission for new UID/GID -chown -R tor:tor /var/lib/tor /var/ipfire/tor +chown -R tor:tor /var/lib/tor +chown -R tor:nobody /var/ipfire/tor
-# Tor settings file needs to be writeable by nobody group for WebUI -chown tor:nobody /var/ipfire/tor/settings -chmod 664 /var/ipfire/tor/settings +# Tor settings files needs to be writeable by nobody group for WebUI +chmod 664 /var/ipfire/tor/{settings,torrc}
start_service --background ${NAME}
--- lfs/wio | 6 ++--- src/wio/wio.cgi | 61 ++++++++++++++++++++++++++++++------------------- 2 files changed, 41 insertions(+), 26 deletions(-)
diff --git a/lfs/wio b/lfs/wio index 58ab16620..c82e9ed12 100644 --- a/lfs/wio +++ b/lfs/wio @@ -1,6 +1,6 @@ ############################################################################### # IPFire.org - An Open Source Firewall Solution # -# Copyright (C) 2007-2018 IPFire Team info@ipfire.org # +# Copyright (C) 2007-2019 IPFire Team info@ipfire.org # ###############################################################################
############################################################################### @@ -9,13 +9,13 @@
include Config
-VER = 1.3.2 +VER = 1.3.3
THISAPP = wio-$(VER) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = wio -PAK_VER = 6 +PAK_VER = 1
############################################################################### # Top-level Rules diff --git a/src/wio/wio.cgi b/src/wio/wio.cgi index 1645aa54e..1c380b1a5 100644 --- a/src/wio/wio.cgi +++ b/src/wio/wio.cgi @@ -3,7 +3,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2017-2018 Stephan Feddersen sfeddersen@ipfire.org # +# Copyright (C) 2017-2019 Stephan Feddersen sfeddersen@ipfire.org # # All Rights Reserved. # # # # This program is free software: you can redistribute it and/or modify # @@ -21,14 +21,14 @@ # # ############################################################################### # -# Version: 2018/02/27 16:54:23 +# Version: 2019/11/08 14:35:23 # # This wio.cgi is based on the Code from the IPCop WIO Addon # and is extremly adapted to work with IPFire. # # Autor: Stephan Feddersen # Co-Autor: Alexander Marx -# Co-Autor: Frank Mainz +# Co-Autor: Frank Mainz (for some Code for the IPCop WIO Addon) #
use strict; @@ -215,7 +215,7 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_save'}.'2' ) { unless ( `ps -A | grep wio.pl` ) { while ( $count < $wiosettings{'COUNT'} ) { if ( defined($wiosettings{"USE$count"}) && $wiosettings{"USE$count"} eq 'on' ) { - $wiosettings{'CLIENTID'} = $wiosettings{'CLIENTID$count'}; + $wiosettings{'CLIENTID'} = $wiosettings{"CLIENTID$count"}; $wiosettings{'TIMESTAMP'} = $wiosettings{"TIMESTAMP$count"}; $wiosettings{'IPADR'} = $wiosettings{"IPADR$count"}; $wiosettings{'HOST'} = $wiosettings{"HOST$count"}; @@ -226,6 +226,7 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_save'}.'2' ) { $wiosettings{'SENDEMAILOFF'} = $wiosettings{"SENDEMAILOFF$count"}; $wiosettings{'PINGMETHODE'} = $wiosettings{"PINGMETHODE$count"}; $wiosettings{'ONLINE'} = $wiosettings{"ONLINE$count"}; + $wiosettings{'WEBINTERFACE'} = $wiosettings{"WEBINTERFACE$count"};
&validSave();
@@ -281,39 +282,54 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_client_add'} ) { ## show / hide arptable
if ( $wiosettings{'WIOGUISHOWARPTABLE'} eq 'arptable' ) { - if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { - $wiosettings{'WIOGUISHOWARPTABLE'} = 'off'; - $arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; + unless ( `ps -A | grep wio.pl` ) { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { + $wiosettings{'WIOGUISHOWARPTABLE'} = 'off'; + $arpbuttontext = "$Lang::tr{'wio_show_table_on'}"; + } + else { + $wiosettings{'WIOGUISHOWARPTABLE'} = 'on'; + $arpbuttontext = "$Lang::tr{'wio_show_table_off'}"; + } } else { - $wiosettings{'WIOGUISHOWARPTABLE'} = 'on'; - $arpbuttontext = "$Lang::tr{'wio_show_table_off'}"; + $infomessage = "$Lang::tr{'wio_error_function'}"; } }
## show / hide clientimporttable
if ( $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} eq 'clientimport' ) { - if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { - $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = 'off'; - $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; + unless ( `ps -A | grep wio.pl` ) { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { + $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = 'off'; + $clientimportbuttontext = "$Lang::tr{'wio_show_table_on'}"; + } + else { + $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = 'on'; + $clientimportbuttontext = "$Lang::tr{'wio_show_table_off'}"; + } } else { - $wiosettings{'WIOGUISHOWCLIENTIMPORTTABLE'} = 'on'; - $clientimportbuttontext = "$Lang::tr{'wio_show_table_off'}"; + $infomessage = "$Lang::tr{'wio_error_function'}"; } }
## show / hide networksearchtable
if ( $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} eq 'networksearch' ) { - if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { - $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'off'; - $networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}"; + unless ( `ps -A | grep wio.pl` ) { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_show_table_off'} ) { + $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'off'; + $networksearchbuttontext = "$Lang::tr{'wio_show_table_on'}"; + } + else { + $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on'; + $networksearchbuttontext = "$Lang::tr{'wio_show_table_off'}"; + } } else { - $wiosettings{'WIOGUISHOWNETWORKSEARCHTABLE'} = 'on'; - $networksearchbuttontext = "$Lang::tr{'wio_show_table_off'}"; + $infomessage = "$Lang::tr{'wio_error_function'}"; } }
@@ -388,6 +404,8 @@ if ( defined($edc) || defined($edd) || defined($wmon) || defined($wmoff) || defi
if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_refresh'} || $wiosettings{'ACTION'} eq $Lang::tr{'wio_sc_refresh'} ) {
+unless ( `ps -A | grep wio.pl` ) { + if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_sc_refresh'} ) { open(FILE, "> $onoffip"); print FILE @current[$wiosettings{'ID'}]; @@ -396,8 +414,6 @@ if ( $wiosettings{'ACTION'} eq $Lang::tr{'wio_refresh'} || $wiosettings{'ACTION' undef($wiosettings{'ID'}); }
-unless ( `ps -A | grep wio.pl` ) { - &Header::showhttpheaders(); &Header::openpage($Lang::tr{'wio'}, 1, $refreshbox); &Header::openbigbox('100%', 'left', ''); @@ -417,7 +433,7 @@ print"
while ( system("/usr/local/bin/wiohelper", "&") ) {}
-exit 0; +exit 0; } else { $infomessage = "$Lang::tr{'wio_already_running'}"; @@ -662,7 +678,6 @@ foreach (@hosts) { $wiosettings{'HOST$count'} = gethostbyaddr(inet_aton($line[1]), AF_INET); if ($wiosettings{'HOST$count'} eq '') { $wiosettings{'HOST$count'} = $line[1]; } $wiosettings{'REMARK$count'} = ''; - $wiosettings{'WEBINTERFACE$count'} = ''; } else { $wiosettings{'HOST$count'} = $line[7];
Hello Stephan,
unfortunately, I do not understand this mail. Isn't that the Tor permission patch of mine sent in a while ago? What is the relationship to wio?
Besides: Your other patches miss the "Signed-off-by"-Tag. Just thought you might want to know...
Thanks, and best regards, Peter Müller
From: "peter.mueller@ipfire.org" peter.mueller@ipfire.org
Fixes #12220
Reported-by: Michael Tremer michael.tremer@ipfire.org Signed-off-by: Peter Müller peter.mueller@ipfire.org Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
lfs/tor | 2 +- src/paks/tor/install.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lfs/tor b/lfs/tor index ea07f6ce2..178f84be9 100644 --- a/lfs/tor +++ b/lfs/tor @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = tor -PAK_VER = 43 +PAK_VER = 44
DEPS = "libseccomp"
diff --git a/src/paks/tor/install.sh b/src/paks/tor/install.sh index 4d0353155..369b65f71 100644 --- a/src/paks/tor/install.sh +++ b/src/paks/tor/install.sh @@ -36,10 +36,10 @@ extract_files restore_backup ${NAME}
# Adjust some folder permission for new UID/GID -chown -R tor:tor /var/lib/tor /var/ipfire/tor +chown -R tor:tor /var/lib/tor +chown -R tor:nobody /var/ipfire/tor
-# Tor settings file needs to be writeable by nobody group for WebUI -chown tor:nobody /var/ipfire/tor/settings -chmod 664 /var/ipfire/tor/settings +# Tor settings files needs to be writeable by nobody group for WebUI +chmod 664 /var/ipfire/tor/{settings,torrc}
start_service --background ${NAME}
Hi Peter,
Stephan contacted me yesterday and said he just pressed a wrong button and sent his patch and the previous commit together as one patchset.
So just ignore this.
Best, -Michael
On 12 Nov 2019, at 21:32, Peter Müller peter.mueller@ipfire.org wrote:
Hello Stephan,
unfortunately, I do not understand this mail. Isn't that the Tor permission patch of mine sent in a while ago? What is the relationship to wio?
Besides: Your other patches miss the "Signed-off-by"-Tag. Just thought you might want to know...
Thanks, and best regards, Peter Müller
From: "peter.mueller@ipfire.org" peter.mueller@ipfire.org
Fixes #12220
Reported-by: Michael Tremer michael.tremer@ipfire.org Signed-off-by: Peter Müller peter.mueller@ipfire.org Signed-off-by: Arne Fitzenreiter arne_f@ipfire.org
lfs/tor | 2 +- src/paks/tor/install.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lfs/tor b/lfs/tor index ea07f6ce2..178f84be9 100644 --- a/lfs/tor +++ b/lfs/tor @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = tor -PAK_VER = 43 +PAK_VER = 44
DEPS = "libseccomp"
diff --git a/src/paks/tor/install.sh b/src/paks/tor/install.sh index 4d0353155..369b65f71 100644 --- a/src/paks/tor/install.sh +++ b/src/paks/tor/install.sh @@ -36,10 +36,10 @@ extract_files restore_backup ${NAME}
# Adjust some folder permission for new UID/GID -chown -R tor:tor /var/lib/tor /var/ipfire/tor +chown -R tor:tor /var/lib/tor +chown -R tor:nobody /var/ipfire/tor
-# Tor settings file needs to be writeable by nobody group for WebUI -chown tor:nobody /var/ipfire/tor/settings -chmod 664 /var/ipfire/tor/settings +# Tor settings files needs to be writeable by nobody group for WebUI +chmod 664 /var/ipfire/tor/{settings,torrc}
start_service --background ${NAME}