Do not set O_EXCL on open() when a published file is on the withdraw list.
authorclaudio <claudio@openbsd.org>
Thu, 20 Jul 2023 05:18:31 +0000 (05:18 +0000)
committerclaudio <claudio@openbsd.org>
Thu, 20 Jul 2023 05:18:31 +0000 (05:18 +0000)
commit58874dc77103f96d6d5feccf576d4e9bcfdb48e9
tree2e18f958d36827d5fcfd5630ecfef7340c012caa
parent07be88f10e3302b5e14b19f05ee09c1c3650d967
Do not set O_EXCL on open() when a published file is on the withdraw list.

If during the process of applying RRDP deltas a object is published then
withdrawn and later published again the current code fails. This is because
published elements use O_EXCL in open() but in the case above the previous
file is still around since withdraws are delayed.

Problem noticed by job@
OK tb@
usr.sbin/rpki-client/repo.c