Michael Felt <[email protected]> added the comment:
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?
----------
nosy: +Michael.Felt
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue17180>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com