projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a82b39
)
Fix the apply_permissions XOR logic so that mask removes mode bits correctly.
author
Zac Medico
<zmedico@gentoo.org>
Fri, 17 Mar 2006 21:04:45 +0000
(21:04 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 17 Mar 2006 21:04:45 +0000
(21:04 -0000)
svn path=/main/trunk/; revision=2917
pym/portage_util.py
patch
|
blob
|
history
diff --git
a/pym/portage_util.py
b/pym/portage_util.py
index 61730c5fefa1141cb81762e8e77a498445f73311..38a03087a5b9f48e434944e6b53af9b224253be1 100644
(file)
--- a/
pym/portage_util.py
+++ b/
pym/portage_util.py
@@
-495,9
+495,9
@@
def apply_permissions(filename, uid=-1, gid=-1, mode=-1, mask=-1,
else:
mode = mode & 07777
if (mode & st_mode != mode) or \
- (
mask ^
st_mode != st_mode):
+ (
(mask ^ st_mode) &
st_mode != st_mode):
new_mode = mode | st_mode
- new_mode =
mask ^ new_
mode
+ new_mode =
(mask ^ new_mode) &
mode
elif mode != -1:
mode = mode & 07777 # protect from unwanted bits
if mode != st_mode: