Bug 426428 - RFE: do not use hardlinks
RFE: do not use hardlinks
Product: Fedora
Classification: Fedora
Component: system-config-network (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Nils Philippsen
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2007-12-20 18:00 EST by Michal Jaegermann
Modified: 2016-08-11 06:16 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-08-11 06:16:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2007-12-20 18:00:04 EST
Description of problem:

Let say that on a machine exist multiple "netprofiles" and at
least some of them have "fixed" arrangements (otherwise it would
be hardly any reason to have these various profiles, wouldn't it?).
Now if you will switch to such profile then /etc/resolv.conf,
and other files too, become hard links to corresponding files
in subdirectories /etc/sysconfig/networking/profiles/.
So far so good.

Now if you will switch on selinux then in /var/log/messages the
following entries start to show up over and over:

restorecond: Will not restore a file with more than one hard link
(/etc/resolv.conf) No such file or directory

with interspersed from time to time

restorecond: Will not restore a file with more than one hard link
(/etc/resolv.conf) Invalid argument

and also, for a good measure,

restorecond: Will not restore a file with more than one hard link
(/etc/resolv.conf) Success

although the last variation is relatively infrequent.

I have no idea what and why periodically calls restorecond and
why /etc/resolv.conf, and apparently not other hard links, make
it unhappy.  Maybe because a label on it ends up as
while other files in /etc/sysconfig/networking/profiles/ appear
to sport system_u:object_r:etc_t:s0?  None of that was set
"by hand".

Quite possibly this is a selinux fault but apparently some
coordination is missing here.

Version-Release number of selected component (if applicable):

How reproducible:
all the time in unpredictable intervals
Comment 1 Ray Todd Stevens 2007-12-30 22:53:01 EST
I have this happening on several machines.
Comment 2 Ray Todd Stevens 2007-12-30 22:56:52 EST
From what I can tell at least one of the issues here is that the
system-config-network is using hard links to have the running configuration in
/etc/system-config/profiles and the corresponding files in actual use be the
same files.   If it is sure that it needs to do this (Which I question), why not
use symlinks.
Comment 3 Ray Todd Stevens 2008-12-23 14:20:11 EST
As of this date in fc10 this is still not fixed, and it is breaking other thing, (minorly)
Comment 4 Ray Todd Stevens 2009-01-05 15:00:57 EST
This causes problems a lot of places.  I am wondering if the RFE: should not be removed, as this is closer to being an actual bug.
Comment 5 Ray Todd Stevens 2009-11-30 12:27:40 EST
This is still a bug causing problems and still exists in fc12
Comment 6 Michal Jaegermann 2009-11-30 13:05:48 EST
That seems to work exactly the other way around in bug 542420.  I am past of beeing confused.
Comment 7 Ray Todd Stevens 2009-11-30 14:45:46 EST
I think this has maybe something to do with network manager.   Of course I also have yet to see a purpose for network manager in the first place.
Comment 8 Ray Todd Stevens 2010-01-10 18:33:12 EST
This bug has caused be to have to do two different scratch reinstall and reload data from backup to recover from system crashes.
Comment 9 Ray Todd Stevens 2010-02-05 17:39:12 EST
This is still causing problems with selinux not being able to fix problems with permissions.
Comment 10 Ray Todd Stevens 2010-11-04 00:08:28 EDT
This is also still a problem.       Of course a big part of the problem is that selinux doesn't seem to handle hardlinks at all well.
Comment 11 Ray Todd Stevens 2011-06-02 10:49:07 EDT
This is still a problem in FC14.   We need to change the version from rawhide.   We also need to get some work on this, as it causes regular problems.   Most of these problems are hidden and hard to diagnose.    Of course it would be nice if selinux could handle files with this kind of hardlinking to.
Comment 12 Fedora Admin XMLRPC Client 2012-12-19 10:29:41 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 13 Nils Philippsen 2016-08-11 06:16:15 EDT
Thanks for taking the time to submit this request for enhancement.
Unfortunately, I haven't gotten around to implement this feature, sorry for

Because I don't actively develop system-config-network anymore, I won't likely
find the time to work on this ticket, so I'll close this bug now.

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