New submission from Leif Middelschulte :
It seems Python does not necessarily determine that it is running inside a
container correctly.
This leads to broken/unexpected behavior when trying to copy files across
filesytems using `copy2`.
This directly affects Python3 inside the official
Leif Middelschulte added the comment:
> Could you please provide name and value of the setxattr() call? I bet it's
> trying to setxattr 'security.selinux' extended file attribute.
(Pdb) bt full
/usr/lib64/python3.7/pdb.py(1701)main()
-> pdb._runscript(mainpyfile
Leif Middelschulte added the comment:
For the sake of completeness, the content of `/tmp/test.py`:
```
#!/usr/bin/env python3
from shutil import copy2
copy2('/tmp/some_file', '/relabel_bug/failure')
```
--
___
Py
Leif Middelschulte added the comment:
@Christian Heimes: is there anything else you need from me? Is this the wrong
forum?
As discussed in the referenced GitHub issue, some SELinux people suggest it
might be a fault in how Python determines (?) it's running within a container
enviro