Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 596744 - net-misc/cmst installs broken dbus policy due to missing 'network' group
Summary: net-misc/cmst installs broken dbus policy due to missing 'network' group
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Qt Bug Alias
URL: https://github.com/andrew-bibb/cmst/i...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-10-10 08:39 UTC by Coacher
Modified: 2017-04-25 08:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info,6.81 KB, text/plain)
2016-10-10 08:39 UTC, Coacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2016-10-10 08:39:23 UTC
Created attachment 449728 [details]
emerge --info

Hello.

cmst installs /etc/dbus-1/system.d/org.cmst.roothelper.conf, which contains
```
    <policy group="network">
        <allow send_destination="org.cmst.roothelper"/>
        <allow send_interface="org.cmst.roothelper"/>
    </policy>
```
However, 'network' group is missing from my system as it wasn't created by any installed package. This causes the following message to be printed on every dbus (re)start, e.g. during system boot:
```
Unknown group "network" in message bus configuration file
```

I don't see that any package creates 'network' group (`qgrep -He 'enewgroup.*network' | wc -l` returns 0).

Please fix.
Comment 1 Coacher 2016-10-27 17:02:30 UTC
Networkmanager in Gentoo relies on 'plugdev' group to allow modifying network connections. 'network' group for cmst has the same purpose. I suggest adjusting the installed d-bus policy for cmst to use 'plugdev' group instead.
Comment 2 Coacher 2016-11-01 13:47:49 UTC
diff --git a/net-misc/cmst/cmst-2016.10.03.ebuild b/net-misc/cmst/cmst-2016.10.03.ebuild
index 142e264..daa7538 100644
--- a/net-misc/cmst/cmst-2016.10.03.ebuild
+++ b/net-misc/cmst/cmst-2016.10.03.ebuild
@@ -26,6 +26,15 @@ RDEPEND="${DEPEND}

 S="${WORKDIR}/${PN}-${P}"

+src_prepare() {
+       default_src_prepare
+
+       # Use Gentoo groups for permissions. See Gentoo bug 596744.
+       sed -i \
+               -e '/group=/s/network/plugdev/' \
+               apps/rootapp/system/distro/arch/org.cmst.roothelper.conf || die
+}
+
 src_configure() {
        export USE_LIBPATH="${EPREFIX}/usr/$(get_libdir)/${PN}"
        eqmake5
Comment 3 Vadim Efimov 2017-03-04 14:28:20 UTC
This is because distro type "gentoo" for CMST missing in distro-specific dirs.
https://github.com/andrew-bibb/cmst/tree/master/apps/rootapp/system/distro

I open issue at github about that https://github.com/andrew-bibb/cmst/issues/163
Now, I unsure about exact group name, because project use "netdev" or "network" group. Arch one used by default if nothing specified.
Not netdev nor plugdev group exist on system, so we have to create one and warn the user.
Comment 5 Michael Palimaka (kensington) gentoo-dev 2017-04-25 08:09:49 UTC
(In reply to Coacher from comment #4)
> Upstream fix:
> https://github.com/andrew-bibb/cmst/commit/
> 4eeab495d6c931b3a726b343151cc3fb0c836528

This is released and fixed in git so I guess this bug is resolved then.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90a154656d6e2f7496bf88d17774bf03fa6667bd