[issue17180] shutil copy* unsafe on POSIX - they preserve setuid/setgit bits

Christian Heimes report at bugs.python.org
Wed Feb 13 12:10:31 CET 2013


Christian Heimes added the comment:

cp removes three bits unless preserve ownership is enabled and some additional things are true. 

mode &= ~ (S_ISUID | S_ISGID | S_ISVTX)

S_ISVTX is the sticky bit.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17180>
_______________________________________


More information about the Python-bugs-list mailing list