Blame SOURCES/cobbler-disable-hardlinks-bz568801.patch

1330ca
--- cobbler/utils.py	2010-10-07 20:12:03.000000000 +0200
1330ca
+++ cobbler/utils.py	2011-05-25 15:53:03.000000000 +0200
1330ca
@@ -996,21 +996,8 @@
1330ca
     return True
1330ca
 
1330ca
 def is_safe_to_hardlink(src,dst,api):
1330ca
-    (dev1, path1) = get_file_device_path(src)
1330ca
-    (dev2, path2) = get_file_device_path(dst)
1330ca
-    if dev1 != dev2:
1330ca
-       return False
1330ca
-    if dev1.find(":") != -1:
1330ca
-       # is remoted
1330ca
-       return False
1330ca
-    # note: this is very cobbler implementation specific!
1330ca
-    if not api.is_selinux_enabled():
1330ca
-       return True
1330ca
-    if _re_initrd.match(os.path.basename(path1)):
1330ca
-       return True
1330ca
-    if _re_kernel.match(os.path.basename(path1)):
1330ca
-       return True
1330ca
-    # we're dealing with SELinux and files that are not safe to chcon
1330ca
+    # 568801: hardlinks ruin SELinux contexts because multiple
1330ca
+    # paths match, avoid hardlinks
1330ca
     return False
1330ca
 
1330ca
 def hashfile(fn, lcache=None, logger=None):