Bug 15737 - s2u in /etc/sysconfig/network-scripts/hostname.d/s2u broadcasts on com.mandriva.user
Summary: s2u in /etc/sysconfig/network-scripts/hostname.d/s2u broadcasts on com.mandri...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Olivier Blin
QA Contact:
URL:
Whiteboard: MGA7TOO
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-04-19 19:12 CEST by w unruh
Modified: 2021-02-08 22:03 CET (History)
5 users (show)

See Also:
Source RPM: s2u
CVE:
Status comment:


Attachments
complete s/mdv/mga/ in API (2.38 KB, patch)
2015-06-09 11:27 CEST, Thierry Vignaud
Details | Diff

Description w unruh 2015-04-19 19:12:01 CEST
Description of problem: s2u in /etc/sysconfig/network-scripts/hostname.d/s2u broadcasts on com.mandriva.user which I do not believe anything is listening to. 
Should this not be com.mageia.user if anything? 
Since I have no idea how s2u works This report may be wrong, but I know that net_applet was broken on the change to Mageia because of the wrong dbus address being used. 
Note that the same is in /etc/dbus-1/system.d/s2u.conf

Anyway, just raising a red flag. 



Reproducible: 

Steps to Reproduce:
Comment 1 Samuel Verschelde 2015-04-19 19:52:31 CEST
This package has no maintainer and has not been taken care of since it was imported by tv in 2011. CCing him in case he cares :)

Your report does seem a valid one.

CC: (none) => thierry.vignaud

Samuel Verschelde 2015-04-19 19:58:40 CEST

Whiteboard: (none) => MGA4TOO
CC: (none) => stormi
Hardware: i586 => All
Version: 4 => Cauldron

Comment 2 David Walser 2015-04-20 02:18:51 CEST
Olivier Blin (blino) previously fixed this same issue in draknetcenter (Bug 3888).

Assignee: bugsquad => mageia

Comment 3 Samuel Verschelde 2015-06-06 02:22:07 CEST
(In reply to David Walser from comment #2)
> Olivier Blin (blino) previously fixed this same issue in draknetcenter (Bug
> 3888).

CCing blino then.

Whiteboard: MGA4TOO => MGA4TOO MGA5TOO
CC: (none) => mageia

Comment 4 Thierry Vignaud 2015-06-09 11:27:10 CEST
Created attachment 6721 [details]
complete s/mdv/mga/ in API

s/mdv/mga/ was blindly done when importing drakx-net and thus it doesn't match s2u anymore :-(

Someone want to test
Thierry Vignaud 2015-06-09 11:28:09 CEST

Blocks: (none) => 16014

Thierry Vignaud 2015-06-09 11:29:18 CEST

Whiteboard: MGA4TOO MGA5TOO => MGA4TOO MGA5TOO PATCH

Thierry Vignaud 2015-06-09 13:16:48 CEST

Blocks: 16014 => (none)

Comment 5 w unruh 2015-06-10 21:13:02 CEST
Not sure what uses s2u nor how to test. I have compiled it and it does compile.
Comment 6 w unruh 2015-06-10 23:15:43 CEST
The new s2u in its interaction with drakx-net seems to still have problems. 

a)The patch does not fix what I originally reported, namely the wrong dbus names in /etc/sysconfig/network-scripts/hostname.d/s2u
A patch is needed for the hostname-post file in the s2u source code. 

b) As reported in bug 16014, the new s2u does solve part of the problem in net_applet but on the wireless coming up, net_applet does not display the "signal strength" fan icon on the taskbar that it is supposed to. This seems to be an s2u problem since it does display the fan with the old s2u.


If I cnange the /com/mandriva/usr and com.mandriva.usr to org.mageia.org as the other changes suggest I should, the netapplet messages do not come up at all. 
The icon sometimes changes from the globe-with-red-x to the fan, and sometimes not. When it goes down it always changes to the globe-with-red-x.

There seems to be a very complex interaction between s2u and net_applet.
Comment 7 w unruh 2016-12-22 08:43:07 CET
s2u still has the mandriva dbus name which of course connects to nothing in Mga6 cauldron.
Comment 8 w unruh 2016-12-22 08:43:57 CET
s2u still has the mandriva dbus name which of course connects to nothing in Mga6 cauldron.
Comment 9 Nicolas Lécureuil 2020-06-07 14:46:11 CEST
to have real feedbacks i added the change from thierry on s2u rpm.

CC: (none) => mageia

Nicolas Lécureuil 2020-06-07 14:48:40 CEST

Whiteboard: MGA4TOO MGA5TOO PATCH => PATCH MGA7TOO

Nicolas Lécureuil 2020-06-07 14:49:05 CEST

Keywords: (none) => PATCH
Whiteboard: PATCH MGA7TOO => MGA7TOO

Comment 10 r howard 2020-06-08 06:26:16 CEST
Looks like net_applet listens for 'org.mageia.network' . See http://gitweb.mageia.org/software/drakx-net/tree/bin/net_applet.  The patch by Thierry attached above should possibly be changed to reflect that as his patch uses "org.mageia.org".

By the way the s2u.spec has the URL: set for the obsolete mandrivalinux.com site. What should that be now?  I have found a copy of the su2 source at https://github.com/eugeni/s2u Unfortunately the person that imported it did not preserve the tags so know real way to know which version it is without diffing it to a source with a known version.

CC: (none) => rihoward1

Comment 11 r howard 2020-06-08 06:28:45 CEST
Addition to my comment 10. Maybe both s2u and net_applet should be changed to use "org.mageia.user" to reflect this is a user space message?
Comment 12 Nicolas Lécureuil 2020-06-08 21:49:47 CEST
(In reply to r howard from comment #10)
> Looks like net_applet listens for 'org.mageia.network' . See
> http://gitweb.mageia.org/software/drakx-net/tree/bin/net_applet.  The patch
> by Thierry attached above should possibly be changed to reflect that as his
> patch uses "org.mageia.org".
> 
> By the way the s2u.spec has the URL: set for the obsolete mandrivalinux.com
> site. What should that be now?  I have found a copy of the su2 source at
> https://github.com/eugeni/s2u Unfortunately the person that imported it did
> not preserve the tags so know real way to know which version it is without
> diffing it to a source with a known version.

i added it on our git as this is the version we have.

thanks.
Comment 13 r howard 2020-06-08 22:12:38 CEST
Nicholas you missed changing file http://gitweb.mageia.org/software/s2u/tree/hostname-post It still uses com.mandriva...
Comment 14 r howard 2020-06-08 22:42:14 CEST
Nicolas http://gitweb.mageia.org/software/s2u/tree/hostname-post still has com.mandriva...

Should net_applet in drax_net be patched to filter for 'org.mageia.user' instead of the 'org.mageia.network' it is currently using to match s2u ?
Comment 15 w unruh 2020-06-08 23:07:41 CEST
As I understand this these are not urls. They are dbus addresses. One basically has to make sure that the address used by all of programs trying to communicate with each other via this mechanism use the same address. It does not particualry matter which address is used as long as they are all the same, as I understand it. 
org.mageia.network looks good, as it tells humans what this message bus is all about. One also wants to make sure that that it is unique so that we are not accidentally delivering messages to programs that do not give a damn about this network stuff, and confuses them when extraneous messages pop up. Unfortunately I do not know enough about dbus to know where to look for a list of all of the message bus names. Also this is not a user message. In /etc/dbus-1/system.d/s2u.conf, a hole is punched only for root.



com.mandriva.network is used in /etc/sysconfig/network-scripts/hostname.d/s2u and in /etc/dbus-1/system.d/s2u.conf  That should certainly be changed. 

/usr/lib/libDrakx/network/connection_manager listens on org.mageia.network
I would also suggest that both the su2 locations be changed to org.mageia.network
so that messages it puts onto dbus get to the intended recipient. 

Note that there seems to nothing else that listens or writes to *.mandria.* on dbus in /etc/ or in /lib/.


Note that the binary /usr/bin/s2u also has com.mandriva.user hard coded into it. I do not know if this is the default in case /etc/sysconfig/network-scripts/hostname.d/s2u  does not exist, or if this is really hard coded. 

In package s2u-0.9.2-8.mga7.src.rpm file s2u.c, it is hard coded and should also be changed to org.mageia.network
Comment 16 Olivier Blin 2021-02-08 22:03:05 CET
Nicolas started to fix it in s2u :
- http://gitweb.mageia.org/software/s2u/commit/?id=1eeda6d8b289cf9866a0a19eb8a0471ce8e1f345
- http://gitweb.mageia.org/software/s2u/commit/?id=f391895d125d15367604e7b4b36da18b8d7d29ce

The "message" signal is coming from hostname-post (adpated in second commit in s2u).

The "updatemenu" signal does not seem to be used anymore, I can not find any usage in update-menus.

The "security_notification" signal needs a fix in msec:
http://gitweb.mageia.org/software/msec/tree/cron-sh/functions.sh#n199

The "custom_notification" signal is for netprofile: https://gitweb.mageia.org/software/s2u/commit/?id=4f2a9fe09089f0a2d4f4c4822309fd238d1041e6
We need a fix in netprofile.
We first need to import netprofile as a git repo, likely from https://github.com/eugeni/netprofile.
Then we need to fix this one:
http://gitweb.mageia.org/software/forks/initscripts/tree/network-scripts/ifup-post#n127

Note You need to log in before you can comment on or make changes to this bug.