After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 741482 - Ensure proper SELinux label on /etc/hostname in ifupdown plugin
Ensure proper SELinux label on /etc/hostname in ifupdown plugin
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
0.9.x
Other Linux
: Normal enhancement
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on: 740409
Blocks:
 
 
Reported: 2014-12-13 14:12 UTC by Laurent Bigonville
Modified: 2015-11-24 11:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Laurent Bigonville 2014-12-13 14:12:25 UTC
Hello,

The ifupdown plugin is not making sure that the /etc/hostname file is properly labeled when changing the hostname on the machine (the ifcfg plugin is doing so).

The plugins should probably adjusted to do so
Comment 1 Thomas Haller 2014-12-14 17:08:13 UTC
I think it is wrong that settings plugins each try to implement get_hostname()/set_hostname().

Instead there should be one central place, that implements the distro-specific(!) ways to set the hostname.


For example, on Fedora, I want to use keyfile only, no ifcfg-rh plugin. But I still want to set the hostname the Fedora way.


This is discussed in bug 740409. I think, we should handle both bugs together.
I'd depend this bug on the other, and then we close them both together.
Comment 2 Laurent Bigonville 2015-11-24 11:06:43 UTC
OK so apparently the code has now been moved to the nm-settings.c file which provides common functions to all the plugins, I guess this bug can be closed.

But the ifcfg-rh plugins still has useless reference to selinux, I guess this can be remvoved too.
Comment 3 Thomas Haller 2015-11-24 11:22:54 UTC
(In reply to Laurent Bigonville from comment #2)
> OK so apparently the code has now been moved to the nm-settings.c file which
> provides common functions to all the plugins, I guess this bug can be closed.
> 
> But the ifcfg-rh plugins still has useless reference to selinux, I guess
> this can be remvoved too.

Ah right. Dropped now http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=e2b9346d7145a1112a9cb572c0de7ae0c3507bc6


Other then that, this BZ is indeed fixed with bug 740409. Just forgot closing this one.