Blame SOURCES/BZ-1113395-verify-permissions-mask.patch

d2a170
commit bb6908d630966d9e385659516c2759c47c0e2ee7
d2a170
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
d2a170
Date:   Fri Mar 28 10:41:39 2014 +0100
d2a170
d2a170
    Mask st_mode to fix verifying permissions for ghost files. BZ 1045415
d2a170
d2a170
diff --git a/yum/packages.py b/yum/packages.py
d2a170
index 69c612f..9522235 100644
d2a170
--- a/yum/packages.py
d2a170
+++ b/yum/packages.py
d2a170
@@ -2033,11 +2033,14 @@ class YumInstalledPackage(YumHeaderPackage):
d2a170
                     problems.append(prob)
d2a170
 
d2a170
                 my_mode = my_st.st_mode
d2a170
+                pf_mode = pf.mode
d2a170
+                perm_mask = 0777
d2a170
                 if 'ghost' in ftypes: #  This is what rpm does, although it
d2a170
-                    my_mode &= 0777   # doesn't usually get here.
d2a170
-                if check_perms and pf.verify_mode and my_mode != pf.mode:
d2a170
+                    my_mode &= perm_mask   # doesn't usually get here.
d2a170
+                    pf_mode &= perm_mask
d2a170
+                if check_perms and pf.verify_mode and my_mode != pf_mode:
d2a170
                     prob = _PkgVerifyProb('mode', 'mode does not match', ftypes)
d2a170
-                    prob.database_value = pf.mode
d2a170
+                    prob.database_value = pf_mode
d2a170
                     prob.disk_value     = my_st.st_mode
d2a170
                     problems.append(prob)
d2a170