Commit Graph

5 Commits

Author SHA1 Message Date
Natanael Copa 1332d5b171 abuild-rmtemp: fix build with clang 2023-10-17 16:33:15 +00:00
Leo 8eeca0adad *: say we are using GPL-2.0-only 2020-10-23 11:39:18 -03:00
Sören Tempel 17cb68e9fb abuild-rmtemp: Do not follow symbolic links
Symbolic links might point to files outside of the chroot and
thus might delete files outside the chroot. This allows deletion
of arbitrary directories on the host from a malicious APKBUILD.

Following hard links shouldn't be a problem since hard links (usually)
cannot refer to directories and since remove(3) removes the link, not
the file it points to it shouldn't cause a problem.

I noticed this because alpine-baselayout creates /var/run as a symlink
to /run. Therefore causing /run to be deleted on the host when using
abuild-rmtemp which in turn causes a bunch of software to no longer
function properly (including OpenRC).
2018-10-11 17:46:45 +02:00
A. Wilcox c1a106cc6c abuild-rmtemp: define _XOPEN_SOURCE to ensure FTW_DEPTH is visible 2017-09-19 12:02:57 +00:00
Kaarle Ritvanen e3a2e14ffa abuild: build in chroot
This patch is based on earlier work by Timo Teräs.
2017-06-27 14:52:50 +03:00