#956457 Enable wired authentication service

Package:
iwd
Source:
iwd
Description:
wireless daemon for Linux
Submitter:
Lars Beckers
Date:
2025-02-18 10:06:03 UTC
Severity:
wishlist
#956457#5
Date:
2020-04-11 14:58:08 UTC
From:
To:
Dear Maintainer,

`iwd' provides a separate daemon, called `ead', for authentication on
wired interfaces. One can use it e.g. with FreeRADIUS to secure access
to a LAN. `wpa_supplicant' offers similar functionality.

Due to the software maintainer's primary focus on wireless,
this feature was not yet declared a standard part and thus needs a
special build-time switch to be set. My request is that you enable it.

Because `ead' is a separate daemon, enabling this feature won't affect
the stability of the wireless daemon for current users of this package.
The README file of the project advises that the configuration option
`--enable-wired' enables this feature. It does not advise against
enabling it, but calls it "optional".

Thanks,
Lars

#956457#10
Date:
2020-04-11 16:09:05 UTC
From:
To:
Hello Lars Beckers,

Thanks for your bug report.

FWIW I'm personally well aware of ead and its functionality.

I personally have no need/use for ead. I expect someone who does
to take care of it. Not only by sending an initial patch, but also
offer to take on the maintenance (as co-maintainer of the package?).

Whoever looks into this should also want to consider the pros and cons
of splitting iwd and ead in separate binary packages or not.

Regards,
Andreas Henriksson

#956457#19
Date:
2025-01-29 12:13:46 UTC
From:
To:
Dear Maintainer,

Attached to this email is a small patch adding a new "ead" sub-package.

It adds --enable-wired when building iwd.

This will then build 'ead', including a man page, a systemd service, and
D-Bus config files to be able to enable this service via D-Bus.

All these new files are now part of a new 'ead' package.

Note that no SysV init file is provided here for ead as this is no
longer mandatory, and this tool is designed for Linux only.

Cheers,
Matt

#956457#24
Date:
2025-02-18 10:03:49 UTC
From:
To:
From: Matthieu Baerts <matttbe@kernel.org>

This patch adds --enable-wired when building iwd.

This will then build 'ead', including a man page, a systemd service, and
D-Bus config files to be able to enable this service via D-Bus.

All these new files are now part of a new 'ead' package.

Note that no SysV init file is provided here for ead as this is no
longer mandatory, and this tool is designed for Linux only.

Similar to iwd, a postinst script is there to make sure the 'netdev'
group has been created, as it is listed in the D-Bus policy file.

Closes: https://bugs.debian.org/956457
Reported-by: Lars Beckers <lars@extmind.de>
Signed-off-by: Matthieu Baerts <matttbe@kernel.org>
---
Notes:
- v2:
  - add ead.postinst file and adduser dependency, see: bug#1098212
  - rewrap description to avoid unneeded short lines
  - add 'ead' in iwd's recommendation list: so if people are switching
    from wpasupplicant to iwd, the functional differences will be
    reduced. It is always possible to avoid installing 'ead' by using
    --no-install-recommends.
---
 debian/control      | 19 +++++++++++++++++++
 debian/ead.install  |  5 +++++
 debian/ead.postinst | 36 ++++++++++++++++++++++++++++++++++++
 debian/rules        |  2 +-
 4 files changed, 61 insertions(+), 1 deletion(-)
 create mode 100644 debian/ead.install
 create mode 100644 debian/ead.postinst

diff --git a/debian/control b/debian/control
index 5a5a8856..d430b843 100644
--- a/debian/control
+++ b/debian/control
@@ -16,6 +16,24 @@ Vcs-Git: https://salsa.debian.org/debian/iwd.git
 Vcs-Browser: https://salsa.debian.org/debian/iwd
 Rules-Requires-Root: no

+Package: ead
+Architecture: linux-any
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
+ adduser,
+Recommends:
+ dbus | dbus-system-bus,
+Description: Ethernet authentication daemon for Linux
+ Ethernet authentication daemon (ead) is a minimalistic Ethernet
+ authentication daemon that uses modern Linux interfaces like
+ cfg80211 and nl80211 (netlink).
+ The daemon provides a D-Bus API.
+ .
+ Note that the package defaults to relying on dbus activation to start.
+ If you want to use ead standalone without any manager,  then you'll
+ need to manually enable the system service.
+
 Package: iwd
 Architecture: linux-any
 Depends:
@@ -25,6 +43,7 @@ Depends:
 Recommends:
  dbus | dbus-system-bus,
  wireless-regdb,
+ ead,
 Suggests:
  network-manager-iwd,
 Breaks:
diff --git a/debian/ead.install b/debian/ead.install
new file mode 100644
index 00000000..7db25269
--- /dev/null
+++ b/debian/ead.install
@@ -0,0 +1,5 @@
+usr/lib/systemd/system/ead.service
+usr/libexec/ead
+usr/share/dbus-1/system-services/net.connman.ead.service
+usr/share/dbus-1/system.d/ead-dbus.conf
+usr/share/man/man*/ead.*
diff --git a/debian/ead.postinst b/debian/ead.postinst
new file mode 100644
index 00000000..f2720bf7
--- /dev/null
+++ b/debian/ead.postinst
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -e
+
+# This script can be called in the following ways:
+#
+# After the package was installed:
+#	<postinst> configure <old-version>
+#
+#
+# If prerm fails during upgrade or fails on failed upgrade:
+#	<old-postinst> abort-upgrade <new-version>
+#
+# If prerm fails during deconfiguration of a package:
+#	<postinst> abort-deconfigure in-favour <new-package> <version>
+#	           removing <old-package> <version>
+#
+# If prerm fails during replacement due to conflict:
+#	<postinst> abort-remove in-favour <new-package> <version>
+
+case "$1" in
+    configure)
+        # Create netdev group used in the D-Bus policy. No error if it exists.
+        addgroup --quiet --system netdev
+        ;;
+
+    abort-upgrade|abort-deconfigure|abort-remove)
+        ;;
+
+    *)
+        echo "$0 called with unknown argument \`$1'" 1>&2
+        exit 1
+        ;;
+esac
+
+#DEBHELPER#
diff --git a/debian/rules b/debian/rules
index d5963549..fb2a4131 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,7 +12,7 @@ TESTS = $(basename $(wildcard unit/*.c))
 TESTS_FLAKY = unit/test-wsc unit/test-eap-sim unit/test-dpp

 override_dh_auto_configure:
-	dh_auto_configure -- --enable-external-ell
+	dh_auto_configure -- --enable-external-ell --enable-wired

 override_dh_auto_test:
 	make -j2 check VERBOSE=1 TESTS='$(filter-out $(TESTS_FLAKY),$(TESTS))'