tmpfiles: fix borked assert
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 6 Jul 2021 14:41:28 +0000 (16:41 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Jul 2021 16:00:38 +0000 (18:00 +0200)
commit5f2d3e45aa156f5fe215c2fd609082423fdd6fc5
tree6520e1133a7c6a0a5e9d45f04f7d34abd4b6ccad
parent01bd34c18ccb49b536c4d8ce7dac68e4e5893d4d
tmpfiles: fix borked assert

It seems that fd_set_perms() is always called after checking that
fd >= 0 (also when called as action() in glob_item_recursively()),
so it seems that the assertion really came from fd==0.

Fixes #20140.

Also three other similar cases are updated.

(cherry picked from commit b4b0f87c6275dde32769c2e75231caa1d4c21f9b)
(cherry picked from commit 1dcecfc50b6c4db3b76b81765403f84c06ecf225)
src/tmpfiles/tmpfiles.c