borgbackup/src/borg/platform
Thomas Waldmann b0eee13124 use a custom mkstemp with mode support, fixes #6933, fixes #6400
hopefully this is the final fix.

after first fixing of #6400 (by using os.umask after mkstemp), there
was a new problem that chmod was not supported on some fs.

even after fixing that, there were other issues, see the ACLs issue
documented in #6933.

the root cause of all this is tempfile.mkstemp internally using a
very secure, but hardcoded and for our use case problematic mode
of 0o600.

mkstemp_mode (mosty copy&paste from python stdlib tempfile module +
"black" formatting applied) supports giving the mode via the api,
that is the only change needed.

slightly dirty due to the _xxx imports from tempfile, but hopefully
this will be supported in some future python version.
2022-08-04 14:22:56 +02:00
..
__init__.py Initial work to build and run borg under windows 2019-08-24 10:17:18 +02:00
base.py use a custom mkstemp with mode support, fixes #6933, fixes #6400 2022-08-04 14:22:56 +02:00
darwin.pyx s/numeric_owner/numeric_ids/g 2021-04-16 15:02:16 +02:00
freebsd.pyx s/numeric_owner/numeric_ids/g 2021-04-16 15:02:16 +02:00
linux.pyx SaveFile: fix race conditions 2022-02-16 23:23:47 +01:00
posix.pyx ‘PyUnicode_AsUnicode’ is deprecated 2022-03-07 21:40:39 +03:00
syncfilerange.pyx Move sync_file_range to its own extension 2020-03-01 00:06:04 -05:00
windows.pyx Initial work to build and run borg under windows 2019-08-24 10:17:18 +02:00
xattr.py remove unneded code and remarks, added needed except clause 2018-11-10 21:56:39 +01:00