unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#61154] [PATCH] gnu: wpa-supplicant: Patch dbus policy.
@ 2023-01-29 20:06 Sergey Trofimov
  2023-02-13 12:53 ` Andrew Tropin
  0 siblings, 1 reply; 3+ messages in thread
From: Sergey Trofimov @ 2023-01-29 20:06 UTC (permalink / raw)
  To: 61154; +Cc: Sergey Trofimov

This patch allows users in netdev group to control wpa-supplicant
via D-Bus interface.
---
 gnu/packages/admin.scm                        |  3 +++
 .../wpa-supplicant-dbus-group-policy.patch    | 23 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 5cea17d562..b3383b4d86 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -2221,6 +2221,9 @@ (define-public wpa-supplicant
     (name "wpa-supplicant")
     (inputs (modify-inputs (package-inputs wpa-supplicant-minimal)
               (prepend dbus)))
+    (source (origin
+              (inherit (package-source wpa-supplicant-minimal))
+              (patches (search-patches "wpa-supplicant-dbus-group-policy.patch"))))
     (arguments
      (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
        ((#:phases phases)
diff --git a/gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch b/gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch
new file mode 100644
index 0000000000..95c18dac18
--- /dev/null
+++ b/gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch
@@ -0,0 +1,23 @@
+Borrowed from debian, allows users in netdev group to control wpa-supplicant
+via D-Bus.
+
+Description: Debian does not use pam_console but uses group membership
+ to control access to D-Bus. Activating both options in the conf file
+ makes it work on Debian and Ubuntu.
+Author: Michael Biebl <biebl@debian.org>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;bug=412179
+---
+--- a/wpa_supplicant/dbus/dbus-wpa_supplicant.conf
++++ b/wpa_supplicant/dbus/dbus-wpa_supplicant.conf
+@@ -14,6 +14,11 @@
+                 <allow send_interface="fi.w1.wpa_supplicant1"/>
+                 <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
+         </policy>
++        <policy group="netdev">
++                <allow send_destination="fi.w1.wpa_supplicant1"/>
++                <allow send_interface="fi.w1.wpa_supplicant1"/>
++                <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
++        </policy>
+         <policy context="default">
+                 <deny own="fi.epitest.hostap.WPASupplicant"/>
+                 <deny send_destination="fi.epitest.hostap.WPASupplicant"/>
-- 
2.39.1





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#61154] [PATCH] gnu: wpa-supplicant: Patch dbus policy.
  2023-01-29 20:06 [bug#61154] [PATCH] gnu: wpa-supplicant: Patch dbus policy Sergey Trofimov
@ 2023-02-13 12:53 ` Andrew Tropin
  2023-03-01  9:39   ` bug#61154: " Christopher Baines
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Tropin @ 2023-02-13 12:53 UTC (permalink / raw)
  To: Sergey Trofimov, 61154; +Cc: Sergey Trofimov

[-- Attachment #1: Type: text/plain, Size: 2775 bytes --]

On 2023-01-29 21:06, Sergey Trofimov wrote:

> This patch allows users in netdev group to control wpa-supplicant
> via D-Bus interface.
> ---
>  gnu/packages/admin.scm                        |  3 +++
>  .../wpa-supplicant-dbus-group-policy.patch    | 23 +++++++++++++++++++
>  2 files changed, 26 insertions(+)
>  create mode 100644 gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 5cea17d562..b3383b4d86 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -2221,6 +2221,9 @@ (define-public wpa-supplicant
>      (name "wpa-supplicant")
>      (inputs (modify-inputs (package-inputs wpa-supplicant-minimal)
>                (prepend dbus)))
> +    (source (origin
> +              (inherit (package-source wpa-supplicant-minimal))
> +              (patches (search-patches "wpa-supplicant-dbus-group-policy.patch"))))
>      (arguments
>       (substitute-keyword-arguments (package-arguments wpa-supplicant-minimal)
>         ((#:phases phases)
> diff --git a/gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch b/gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch
> new file mode 100644
> index 0000000000..95c18dac18
> --- /dev/null
> +++ b/gnu/packages/patches/wpa-supplicant-dbus-group-policy.patch
> @@ -0,0 +1,23 @@
> +Borrowed from debian, allows users in netdev group to control wpa-supplicant
> +via D-Bus.
> +
> +Description: Debian does not use pam_console but uses group membership
> + to control access to D-Bus. Activating both options in the conf file
> + makes it work on Debian and Ubuntu.
> +Author: Michael Biebl <biebl@debian.org>
> +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;bug=412179
> +---
> +--- a/wpa_supplicant/dbus/dbus-wpa_supplicant.conf
> ++++ b/wpa_supplicant/dbus/dbus-wpa_supplicant.conf
> +@@ -14,6 +14,11 @@
> +                 <allow send_interface="fi.w1.wpa_supplicant1"/>
> +                 <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
> +         </policy>
> ++        <policy group="netdev">
> ++                <allow send_destination="fi.w1.wpa_supplicant1"/>
> ++                <allow send_interface="fi.w1.wpa_supplicant1"/>
> ++                <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
> ++        </policy>
> +         <policy context="default">
> +                 <deny own="fi.epitest.hostap.WPASupplicant"/>
> +                 <deny send_destination="fi.epitest.hostap.WPASupplicant"/>

Thank you for the patch, applied, reformatted to fit 80 columns, updated
commit message, pushed as 8d8b9a4c0c6273ce1680233ae234294f511e81b6.

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#61154: [PATCH] gnu: wpa-supplicant: Patch dbus policy.
  2023-02-13 12:53 ` Andrew Tropin
@ 2023-03-01  9:39   ` Christopher Baines
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Baines @ 2023-03-01  9:39 UTC (permalink / raw)
  To: 61154-done

[-- Attachment #1: Type: text/plain, Size: 236 bytes --]


Andrew Tropin <andrew@trop.in> writes:

> Thank you for the patch, applied, reformatted to fit 80 columns, updated
> commit message, pushed as 8d8b9a4c0c6273ce1680233ae234294f511e81b6.

This does look to be merged, so marking as done.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-01  9:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-29 20:06 [bug#61154] [PATCH] gnu: wpa-supplicant: Patch dbus policy Sergey Trofimov
2023-02-13 12:53 ` Andrew Tropin
2023-03-01  9:39   ` bug#61154: " Christopher Baines

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).