fs-util: change chmod_and_chown() to not complain if stat data already matches
authorLennart Poettering <lennart@poettering.net>
Thu, 14 Mar 2019 15:47:03 +0000 (16:47 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 Mar 2019 15:52:28 +0000 (16:52 +0100)
commit30ff18d8a2cd74328e5915a14c059cd122f32710
tree4cb188073d59dc2f4dc41a464d79d07994d4b7fb
parent17b70256f251905bcce9e7cdcd84e32213c8f5b4
fs-util: change chmod_and_chown() to not complain if stat data already matches

Let's reduce the chance of failure: if we can't apply the chmod/chown
requested, check if it's applied anyway, and if so, supress the error.

This is even race-free since we operate on an O_PATH fd anyway.
src/basic/fs-util.c