util-lib: when copying files make sure to apply some chattrs early, some late
authorLennart Poettering <lennart@poettering.net>
Thu, 28 Mar 2019 16:54:04 +0000 (17:54 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 28 Mar 2019 17:43:04 +0000 (18:43 +0100)
commit8a016c746ef4f7e9b5fcc5fc7086e80880d84608
tree3de74a91ac4963ec214009b55c14fd72b1429712
parentc3272fd4df4a2ff3ebc1b8d4024d56bc803a1b62
util-lib: when copying files make sure to apply some chattrs early, some late

Some chattrs only work sensible if you set them right after opening a
file for create (think: FS_NOCOW_FL). Others only work when they are
applied when the file is fully written (think: FS_IMMUTABLE_FL). Let's
take that into account when copying files and applying a chattr to them.
src/basic/chattr-util.h
src/basic/copy.c
src/basic/copy.h
src/firstboot/firstboot.c
src/import/pull-raw.c
src/import/pull-tar.c
src/nspawn/nspawn.c
src/portable/portable.c
src/shared/machine-image.c
src/systemctl/systemctl.c
src/test/test-copy.c