]> arthur.barton.de Git - bup.git/commit
hlinkdb: respect umask/sgid/etc. when creating new db
authorRob Browning <rlb@defaultvalue.org>
Fri, 24 Jun 2022 21:36:04 +0000 (16:36 -0500)
committerRob Browning <rlb@defaultvalue.org>
Fri, 1 Jul 2022 19:17:05 +0000 (14:17 -0500)
commit6dee94a429e456888e692910f7bb0d82b1c06d60
tree994362e1106e7e2c8fe31cdaea75622cc3aeb63a
parent3137a35f8a734fff4d5b706c3ea94dffa8c0e298
hlinkdb: respect umask/sgid/etc. when creating new db

Use atomically_replaced_file to ensure that the new db respects the
current umask, any directory sgid bit, etc., and use an ExitStack to
try to make sure all the corner cases are covered.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/hlinkdb.py