Message323561
I am looking at this.
Based on the comments from a historical perspective - copyfile() needs to be calling the copy_mode function before any copying actually occurs.
As the dest is already open for writing it does not matter (on posix)
what mode it has later on.
Question: in copystat() there is a block that talks about chown() in the comments but in the code it only seems to be accessing chmod(). Should there (also) be a call to chown "if _SUPER"?
_SUPER = _POSIX and os.geteuid() == 0
basically - mode becomes:
# remove setuid, setgid and sticky bits if _POSIX and not _SUPER
mode = stat.S_IMODE(st.st_mode) & _REMOVE_HARMFUL_MASK if _POSIX and not _SUPER else stat.S_IMODE(st.st_mode)
Comments? |
|
Date |
User |
Action |
Args |
2018-08-15 11:01:10 | Michael.Felt | set | recipients:
+ Michael.Felt, georg.brandl, terry.reedy, pitrou, larry, giampaolo.rodola, christian.heimes, benjamin.peterson, tarek, Arfrever, milko.krachounov, neologix, hynek, Jim.Jewett, serhiy.storchaka |
2018-08-15 11:01:09 | Michael.Felt | set | messageid: <1534330869.85.0.56676864532.issue17180@psf.upfronthosting.co.za> |
2018-08-15 11:01:09 | Michael.Felt | link | issue17180 messages |
2018-08-15 11:01:09 | Michael.Felt | create | |
|