You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
1.2 KiB

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