* [git.ipfire.org] IPFire 2.x development tree branch, next, updated. bed265cc5ab80f97c4981f2ba5d4c1cb10c55f57
@ 2024-02-28 16:46 Michael Tremer
0 siblings, 0 replies; only message in thread
From: Michael Tremer @ 2024-02-28 16:46 UTC (permalink / raw)
To: ipfire-scm
[-- Attachment #1: Type: text/plain, Size: 33318 bytes --]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via bed265cc5ab80f97c4981f2ba5d4c1cb10c55f57 (commit)
via 3ee04b3b8a4da3513d288c5e4dfd0d3139b2d7ea (commit)
via c790899f7383dae7f734a44c1570da1c9246b778 (commit)
via f433fdcd90cb406f1095e6c3d2fa6af7cd85efb3 (commit)
via 033252e043de35cc1da36e0eb5dc198126abbae5 (commit)
via 60a050768f1e3e4dd79c1696e249d426cdb9eab7 (commit)
via bf93033801e5c7a1e6de05a073321e909f43a388 (commit)
via 7c6ff5ff12331a53f416080a44c8d6145e78bfac (commit)
via 84c599f55f2b85b0e3f6c9b058b132f2d39b0a46 (commit)
via 2ee8edb81a1851ce6bab10dac383c36c67139917 (commit)
via c082a0cc9a8f9faf0f7db38cda1641a1f34d74c9 (commit)
via bf3f602e05df35b7619c39243c88d571c9309e8a (commit)
via 06c2bfa3c4d54a6fc6c3edb834ccb65732850383 (commit)
via 749b93c6e96d032a04a87ebaf3f4cbba7b34f5db (commit)
via 43c2dc9318f5733006388563468ba75e39e8d997 (commit)
via bb88fd1b69ae27e9c14b97d219879627a473a3d2 (commit)
via cf70bd231a1ad7ba9507514722ce7f10f92af388 (commit)
via b95afd6aca51723390d4cc14a9607e9333bca4b4 (commit)
via 5cf3bc3507b841078d25852672931e8f49d59bb6 (commit)
via 605217e96f9c4b99fe66ca8c610cdf58e7797947 (commit)
from a809f932464a603af0bda13dfb558573ba58a483 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit bed265cc5ab80f97c4981f2ba5d4c1cb10c55f57
Merge: 3ee04b3b8a 2ee8edb81a
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Feb 28 16:44:06 2024 +0000
Merge remote-tracking branch 'ms/wsdd' into next
commit 3ee04b3b8a4da3513d288c5e4dfd0d3139b2d7ea
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Feb 28 16:41:22 2024 +0000
core185: Ship backup.pl and ovpnmain.cgi
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit c790899f7383dae7f734a44c1570da1c9246b778
Author: Adolf Belka <adolf.belka(a)ipfire.org>
Date: Mon Feb 26 16:05:01 2024 +0100
backup.pl: Fixes bug#13404 - Clear out OpenVPN certs before doing restore
- Existing situation is if four new client connections are created and then it is decided
to restore to an earlier stage the new certficates will be in the certs directory but
not usable from the WUI page as they are no longer shown in the client connection table
as that now shows the ones from the restored backup.
- This patch clears the /var/ipfire/ovpn/certs/ directory before restoring the contents
of the backup so that the certs directory only holds what was in the backup.
Fixes: Bug#13404
Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit f433fdcd90cb406f1095e6c3d2fa6af7cd85efb3
Author: Adolf Belka <adolf.belka(a)ipfire.org>
Date: Mon Feb 26 16:05:00 2024 +0100
ovpnmain.cgi: Fixes bug#13404 - prevents certs being saved if common name is already used
- This was fixed by moving the code for checking if the common name is already used, to
the same location as the code for checking if the connection name is already used.
- Tested out on vm testbed and confirmed that the certificates are not created and the
index.txt not updated if the common name is flagged as already being used. If the
entry is changed to use a new CN and Save pressed then the certs are saved and the
index.txt updated. If Cancel is pressed then no certs are saved and index.txt is not
updated.
Fixes: Bug#13404
Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 033252e043de35cc1da36e0eb5dc198126abbae5
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Feb 28 16:29:51 2024 +0000
core185: Ship dhcp.cgi
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 60a050768f1e3e4dd79c1696e249d426cdb9eab7
Author: Adolf Belka <adolf.belka(a)ipfire.org>
Date: Sat Feb 24 15:51:14 2024 +0100
dhcp.cgi: Fixes bug#11774 - allows dhcp option of array of integer 8
- This v2 version is to correct the bug number. I entered a wronn bug number in the first
version
- This extends the allowed options from just array of ip-address to also include
integer 8 or integer 16 or integer 32.
- Tested out on vm testbed. The array of integer 8 (or 16 or 32) is acceptewd by the dhcp
options section. I am not able to test out that the function actually works as I don't
have any dhcp situation set up to use that capability.
- Records or array of records is still not included. It was only an expansion of the array
of section to include integers.
Fixes: bug#11774
Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit bf93033801e5c7a1e6de05a073321e909f43a388
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Feb 28 16:11:04 2024 +0000
core185: Ship dns.cgi
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 7c6ff5ff12331a53f416080a44c8d6145e78bfac
Author: Adolf Belka <adolf.belka(a)ipfire.org>
Date: Wed Feb 28 14:35:26 2024 +0100
dns.cgi: Fixes bug#12395 - German umlauts not correctly displayed in remarks
- If Freifunk München e.V. is entered as a remark it gets converted to
Freifunk München e.V.
- This is because cleanhtml is used on the remark text before saving it to the file and
the HTML::Entities::encode_entities command that is run on that remark text encodes all
higher bit characters as unsafe characters and replaces them with their HTML entity
representation.
- Have tested out the remark with a range of different characters with diacritical marks
and all of the ones tested were re-written.
- The use of the cleanhtml makes sense when used on URL's or on text that is going to be
printed as part of the HTML code for a page but it doesn't seem to make sense for text
used in a remark.
- The cleanhtml function is only used on the remark text in dns.cgi and not on any other
entries on the page.
- Removing the call to the cleanhtml function results in the German umlauts being printed
in the remark section.
- Many of the WUI pages have the cleanhtml function used on remark or comment text.
- fwhosts.cgi does not use cleanhtml anywhere. So all its remark sections work with
characters with diacritical marks.
- If this patch is accepted, I will then submit patches for the other WUI pages where
characters with diacritical marks are re-written in remark or comment sections.
Fixes: Bug#12395
Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 84c599f55f2b85b0e3f6c9b058b132f2d39b0a46
Author: Adolf Belka <adolf.belka(a)ipfire.org>
Date: Mon Feb 26 09:33:04 2024 +0100
Core Update 185: Ship elfutils
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 2ee8edb81a1851ce6bab10dac383c36c67139917
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:18:46 2024 +0100
wsdd: Call it by its full name
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit c082a0cc9a8f9faf0f7db38cda1641a1f34d74c9
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:17:09 2024 +0100
wsdd: Add a restart command
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit bf3f602e05df35b7619c39243c88d571c9309e8a
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:15:43 2024 +0100
wsdd: Create the chroot directory only on start
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit 06c2bfa3c4d54a6fc6c3edb834ccb65732850383
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:15:13 2024 +0100
wsdd: Compose the ARGS array only when we need it
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit 749b93c6e96d032a04a87ebaf3f4cbba7b34f5db
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:14:11 2024 +0100
wsdd: Append --interface switches to the arguments array
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit 43c2dc9318f5733006388563468ba75e39e8d997
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:11:53 2024 +0100
wsdd: Securely parse the workgroup name
Because of a single variable being passwd with the workgroup, it would
have been possible to inject shell commands here. Passing it in the
array prevents that.
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit bb88fd1b69ae27e9c14b97d219879627a473a3d2
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:10:04 2024 +0100
wsdd: Collect static command line arguments in an array
This is easier to handle than a large number of variables.
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit cf70bd231a1ad7ba9507514722ce7f10f92af388
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:07:04 2024 +0100
wsdd: Use long options for clarity
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit b95afd6aca51723390d4cc14a9607e9333bca4b4
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:05:29 2024 +0100
wsdd: Reindent initscript
No spaces. Just tabs.
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit 5cf3bc3507b841078d25852672931e8f49d59bb6
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Thu Jan 11 16:02:29 2024 +0100
wsdd: Simplify starting/stopping and checking wsdd
Signed-off-by: Daniel Weismüller <daniel.weismueller(a)ipfire.org>
commit 605217e96f9c4b99fe66ca8c610cdf58e7797947
Author: Adolf Belka <adolf.belka(a)ipfire.org>
Date: Wed Jan 10 14:30:20 2024 +0100
wsdd: Install wsdd - fixes bug13445
- lfs and toorfile created for wsdd
- wsdd added to make.sh script
- created install/update/uninstall scripts for wsdd that create an unpriveleged user and
group.
- initscript created for wsdd. As wsdd is a python3 script, when it is run as a daemon the
pidof command does not find any pid for wsdd. So a directory/file for a pid file was
created. This is then passed to the loadproc and killproc commands. After the loadproc
command has been created the pid is extracted from the ps aux command and put into the
pid file. This then works when running the killproc command for it to know what to go
and stop. The statusproc command does not have the ability to feed in the pid from a
pid file and so it fails to find a running wsdd as it uses the pidof command. Code was
added to the status section of the initscript to check if the pid file exists and if so
to print the same command as used with the statusproc command, and also the same
wording if the pid file does not exist because wsdd is not running.
- info from the ethernet/settings file is used to identify if only green0 is available or
if blue0 is also used and based on this the appropriate interface commands are added to
the wsdd command.
- wsdd is also set up to run in a chroot
- Has been tested on my vm testbed, initially by editing the files on the vm clone. After
everything confiremd to be working, the build was successfully carried out and the
.ipfire package was copied to a new vm clone installed and shown to perform as expected.
This test only confirms that wsdd is correctly installed and started. Shutsdown and
restarts on reboot successfully. Confirmed from the ps aux info that wsdd has been
started with the correct options. Thge testing can not evaluate if wsdd enables windows
systems newer than version 7 top be able to detect the samba shares as I have no
windows systems.
Fixes: Bug13445
Tested-by: Adolf Belka <adolf.belka(a)ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
config/backup/backup.pl | 4 +++
config/rootfiles/core/185/filelists/elfutils | 1 +
config/rootfiles/core/185/filelists/files | 4 +++
config/rootfiles/packages/wsdd | 2 ++
html/cgi-bin/dhcp.cgi | 4 +--
html/cgi-bin/dns.cgi | 2 --
html/cgi-bin/ovpnmain.cgi | 38 ++++++++++----------
lfs/{protobuf => wsdd} | 28 +++++++++------
make.sh | 1 +
src/initscripts/packages/{mympd => wsdd} | 51 ++++++++++++++++++++-------
src/paks/{alsa => wsdd}/install.sh | 20 ++++++-----
src/paks/{transmission => wsdd}/uninstall.sh | 4 +--
src/paks/{amazon-ssm-agent => wsdd}/update.sh | 0
13 files changed, 102 insertions(+), 57 deletions(-)
create mode 120000 config/rootfiles/core/185/filelists/elfutils
create mode 100644 config/rootfiles/packages/wsdd
copy lfs/{protobuf => wsdd} (86%)
copy src/initscripts/packages/{mympd => wsdd} (65%)
copy src/paks/{alsa => wsdd}/install.sh (82%)
copy src/paks/{transmission => wsdd}/uninstall.sh (97%)
copy src/paks/{amazon-ssm-agent => wsdd}/update.sh (100%)
Difference in files:
diff --git a/config/backup/backup.pl b/config/backup/backup.pl
index 7992f21c5..b43420740 100644
--- a/config/backup/backup.pl
+++ b/config/backup/backup.pl
@@ -75,6 +75,10 @@ make_backup() {
restore_backup() {
local filename="${1}"
+ # remove all openvpn certs to prevent old unusable
+ # certificates being left in directory after a restore
+ rm -f /var/ipfire/ovpn/certs/*
+
# Extract backup
if ! tar xvzpf "${filename}" -C / \
--exclude-from="/var/ipfire/backup/exclude" \
diff --git a/config/rootfiles/core/185/filelists/elfutils b/config/rootfiles/core/185/filelists/elfutils
new file mode 120000
index 000000000..8367974bb
--- /dev/null
+++ b/config/rootfiles/core/185/filelists/elfutils
@@ -0,0 +1 @@
+../../../common/elfutils
\ No newline at end of file
diff --git a/config/rootfiles/core/185/filelists/files b/config/rootfiles/core/185/filelists/files
index c2af22632..8a0e5c49f 100644
--- a/config/rootfiles/core/185/filelists/files
+++ b/config/rootfiles/core/185/filelists/files
@@ -43,3 +43,7 @@ lib/firmware/netronome/flower/nic_AMDA0078-0012_8x10.nffw
lib/firmware/nvidia/tegra124/vic.bin
lib/firmware/nvidia/tegra186/vic.bin
lib/firmware/nvidia/tegra210/vic.bin
+srv/web/ipfire/cgi-bin/dhcp.cgi
+srv/web/ipfire/cgi-bin/dns.cgi
+srv/web/ipfire/cgi-bin/ovpnmain.cgi
+var/ipfire/backup/bin/backup.pl
diff --git a/config/rootfiles/packages/wsdd b/config/rootfiles/packages/wsdd
new file mode 100644
index 000000000..ce225043a
--- /dev/null
+++ b/config/rootfiles/packages/wsdd
@@ -0,0 +1,2 @@
+etc/rc.d/init.d/wsdd
+usr/bin/wsdd
diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi
index c079fe1ae..be00f199a 100644
--- a/html/cgi-bin/dhcp.cgi
+++ b/html/cgi-bin/dhcp.cgi
@@ -2,7 +2,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2023 IPFire Team <info(a)ipfire.org> #
+# Copyright (C) 2007-2024 IPFire Team <info(a)ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -48,7 +48,7 @@ my @nosaved=();
my %color = ();
#Basic syntax allowed for new Option definition. Not implemented: RECORDS & array of RECORDS
-our $OptionTypes = 'boolean|((un)?signed )?integer (8|16|32)|ip-address|text|string|encapsulate \w+|array of ip-address';
+our $OptionTypes = 'boolean|((un)?signed )?integer (8|16|32)|ip-address|text|string|encapsulate \w+|array of (ip-address|integer (8|16|32))';
&Header::showhttpheaders();
our @ITFs=('GREEN');
diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi
index 0a34d3fd6..f3dd5c7a9 100644
--- a/html/cgi-bin/dns.cgi
+++ b/html/cgi-bin/dns.cgi
@@ -141,8 +141,6 @@ if (($cgiparams{'SERVERS'} eq $Lang::tr{'save'}) || ($cgiparams{'SERVERS'} eq $L
# Go further if there was no error.
if ( ! $errormessage) {
- # Check if a remark has been entered.
- $cgiparams{'REMARK'} = &Header::cleanhtml($cgiparams{'REMARK'});
my %dns_servers = ();
my $id;
diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index eb89c5095..98900b277 100755
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -4216,15 +4216,25 @@ if ($cgiparams{'TYPE'} eq 'net') {
}
}
- # Check for RW if client name is already set
- if ($cgiparams{'TYPE'} eq 'host') {
- foreach my $key (keys %confighash) {
- if ($confighash{$key}[1] eq $cgiparams{'NAME'}) {
- $errormessage = $Lang::tr{'a connection with this name already exists'};
- goto VPNCONF_ERROR;
- }
- }
- }
+ # Check for RW if client name is already set
+ if ($cgiparams{'TYPE'} eq 'host') {
+ foreach my $key (keys %confighash) {
+ if ($confighash{$key}[1] eq $cgiparams{'NAME'}) {
+ $errormessage = $Lang::tr{'a connection with this name already exists'};
+ goto VPNCONF_ERROR;
+ }
+ }
+ }
+
+ # Check if there is no other entry with this common name
+ if ((! $cgiparams{'KEY'}) && ($cgiparams{'AUTH'} ne 'psk')) {
+ foreach my $key (keys %confighash) {
+ if ($confighash{$key}[2] eq $cgiparams{'CERT_NAME'}) {
+ $errormessage = $Lang::tr{'a connection with this common name already exists'};
+ goto VPNCONF_ERROR;
+ }
+ }
+ }
# Replace empty strings with a .
(my $ou = $cgiparams{'CERT_OU'}) =~ s/^\s*$/\./;
@@ -4309,16 +4319,6 @@ if ($cgiparams{'TYPE'} eq 'net') {
goto VPNCONF_ERROR;
}
- # Check if there is no other entry with this common name
- if ((! $cgiparams{'KEY'}) && ($cgiparams{'AUTH'} ne 'psk')) {
- foreach my $key (keys %confighash) {
- if ($confighash{$key}[2] eq $cgiparams{'CERT_NAME'}) {
- $errormessage = $Lang::tr{'a connection with this common name already exists'};
- goto VPNCONF_ERROR;
- }
- }
- }
-
# Save the config
my $key = $cgiparams{'KEY'};
diff --git a/lfs/wsdd b/lfs/wsdd
new file mode 100644
index 000000000..aa65e47ef
--- /dev/null
+++ b/lfs/wsdd
@@ -0,0 +1,89 @@
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007-2024 IPFire Team <info(a)ipfire.org> #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+VER = 0.7.1
+SUMMARY = A Web Service Discovery host daemon.
+
+THISAPP = wsdd-$(VER)
+DL_FILE = $(THISAPP).tar.gz
+DL_FROM = $(URL_IPFIRE)
+DIR_APP = $(DIR_SRC)/$(THISAPP)
+TARGET = $(DIR_INFO)/$(THISAPP)
+PROG = wsdd
+PAK_VER = 1
+
+DEPS =
+
+SERVICES = wsdd
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_BLAKE2 = ce43022c3bd9f7ff1fd7169ac0d5ab6b2ff78d35c221c05b2e20908a5772d563ab2aca571d4e6ae48a55d19d4adcb9cde60f720ae47af8ee950198224fcfdb26
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+b2 : $(subst %,%_BLAKE2,$(objects))
+
+dist:
+ @$(PAK)
+
+###############################################################################
+# Downloading, checking, b2sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+ @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+ @$(LOAD)
+
+$(subst %,%_BLAKE2,$(objects)) :
+ @$(B2SUM)
+
+###############################################################################
+# Installation Details
+###############################################################################
+
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+ @$(PREBUILD)
+ @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && cp src/wsdd.py /usr/bin/wsdd
+
+ #install initscripts
+ $(call INSTALL_INITSCRIPTS,$(SERVICES))
+
+ @rm -rf $(DIR_APP)
+ @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 7b56b7fc8..64dbef5c4 100755
--- a/make.sh
+++ b/make.sh
@@ -1711,6 +1711,7 @@ buildipfire() {
lfsmake2 perl-URI-Encode
lfsmake2 rsnapshot
lfsmake2 mympd
+ lfsmake2 wsdd
# Kernelbuild ... current we have no platform that need
# multi kernel builds so KCFG is empty
diff --git a/src/initscripts/packages/wsdd b/src/initscripts/packages/wsdd
new file mode 100644
index 000000000..68e8f3de0
--- /dev/null
+++ b/src/initscripts/packages/wsdd
@@ -0,0 +1,78 @@
+#!/bin/sh
+###############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2007-2024 IPFire Team <info(a)ipfire.org> #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+###############################################################################
+
+. /etc/sysconfig/rc
+. $rc_functions
+
+eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
+
+PIDFILE="/var/run/wsdd.pid"
+
+case "$1" in
+ start)
+ ARGS=(
+ # Launch as non-privileged user
+ "--user" "wsdd:wsdd"
+
+ # Launch in chroot
+ "--chroot" "/var/run/wsdd"
+
+ # Only use IPv4
+ "--ipv4only"
+
+ # Configure the workgroup
+ "--workgroup" "$(testparm -s --parameter-name workgroup 2>/dev/null)"
+ )
+
+ # Conditionally add the GREEN/BLUE interface
+ for intf in GREEN_DEV BLUE_DEV; do
+ if [ -n "${!intf}" ]; then
+ ARGS+=( "--interface" "${!intf}" )
+ fi
+ done
+
+ # Create chroot directory for wsdd
+ mkdir -p /var/run/wsdd
+
+ boot_mesg "Starting Web Service Discovery Host Daemon..."
+ loadproc -b -p "${PIDFILE}" /usr/bin/wsdd "${ARGS[@]}"
+ ;;
+
+ stop)
+ boot_mesg "Stopping Web Service Discovery Host Daemon..."
+ killproc -p "${PIDFILE}" /usr/bin/wsdd
+ ;;
+
+ status)
+ statusproc /usr/bin/wsdd
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: $0 (start|stop|status|restart)"
+ exit 1
+ ;;
+esac
+
diff --git a/src/paks/wsdd/install.sh b/src/paks/wsdd/install.sh
new file mode 100644
index 000000000..181b84eb9
--- /dev/null
+++ b/src/paks/wsdd/install.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+############################################################################
+# #
+# This file is part of the IPFire Firewall. #
+# #
+# IPFire is free software; you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation; either version 2 of the License, or #
+# (at your option) any later version. #
+# #
+# IPFire is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with IPFire; if not, write to the Free Software #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+# #
+# Copyright (C) 2007 IPFire-Team <info(a)ipfire.org>. #
+# #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+
+# If the wsdd user does not exist yet, then create it and add to wsdd group.
+if ! getent user wsdd >/dev/null; then
+ useradd -r -U -d / -s /bin/false -c "wsdd user" wsdd
+ usermod -a -G wsdd wsdd
+fi
+
+extract_files
+restore_backup ${NAME}
+
+# Create startlinks
+ln -sf ../init.d/wsdd /etc/rc.d/rc0.d/K35wsdd
+ln -sf ../init.d/wsdd /etc/rc.d/rc3.d/S65wsdd
+ln -sf ../init.d/wsdd /etc/rc.d/rc6.d/K35wsdd
+start_service ${NAME}
+exit 0
diff --git a/src/paks/wsdd/uninstall.sh b/src/paks/wsdd/uninstall.sh
new file mode 100644
index 000000000..4c52ee281
--- /dev/null
+++ b/src/paks/wsdd/uninstall.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+############################################################################
+# #
+# This file is part of the IPFire Firewall. #
+# #
+# IPFire is free software; you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation; either version 2 of the License, or #
+# (at your option) any later version. #
+# #
+# IPFire is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with IPFire; if not, write to the Free Software #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+# #
+# Copyright (C) 2007 IPFire-Team <info(a)ipfire.org>. #
+# #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+stop_service ${NAME}
+make_backup ${NAME}
+remove_files
+# Remove all start links.
+rm -rf /etc/rc.d/rc*.d/*wsdd
+exit 0
diff --git a/src/paks/wsdd/update.sh b/src/paks/wsdd/update.sh
new file mode 100644
index 000000000..99776659c
--- /dev/null
+++ b/src/paks/wsdd/update.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+############################################################################
+# #
+# This file is part of the IPFire Firewall. #
+# #
+# IPFire is free software; you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation; either version 2 of the License, or #
+# (at your option) any later version. #
+# #
+# IPFire is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with IPFire; if not, write to the Free Software #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+# #
+# Copyright (C) 2007-2020 IPFire-Team <info(a)ipfire.org>. #
+# #
+############################################################################
+#
+. /opt/pakfire/lib/functions.sh
+extract_backup_includes
+./uninstall.sh
+./install.sh
hooks/post-receive
--
IPFire 2.x development tree
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-28 16:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28 16:46 [git.ipfire.org] IPFire 2.x development tree branch, next, updated. bed265cc5ab80f97c4981f2ba5d4c1cb10c55f57 Michael Tremer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox