77361331
by Allan McRae at 2024-09-08T12:18:38+10:00
libalpm: only chown downloaded files when running as root
Some libaplm utilities sync databases as a non-root user for use in
actvities other than system updates. The ability to download as a
non-root user was broken as part of the download sandboxing.
Applying a minimial fix by preventing the chown of the downloaded file
if the user is non-root. A larger change increasing the robustness
and error checking of this path is warranted in the future.
Signed-off-by: Allan McRae <allan@archlinux.org>
(cherry picked from commit 7bc5d55b56f41518e0a53eed13d4c523aea848e5)