incorrect chmod in init.py
Status: Abandoned
Brought to you by:
henning
in the function checkfile the code intended to fix
a file mode instead resets the mode to the incorrect
value.
Here's the corrected code
def checkfile(fn, perm):
global found_error
try: st = os.stat(fn)
except: return
mode = stat.S_IMODE(st[stat.ST_MODE])
owner = st[stat.ST_UID]
user = os.getuid()
group = os.getgid()
if mode != perm or owner != user:
try:
os.chmod(fn, perm) # WAS os.chmod(fn, mode)
os.chown(fn, user, group)
return
the os.chmod is on line 29 of init.py
Dan