CVSROOT: /cvs Module name: src Changes by: r...@cvs.openbsd.org 2018/01/14 05:12:52
Modified files: distrib/miniroot: install.sub Log message: Prefetched sets are stored by root, but are read by an unprivileged user during the actual install phase. Add a check to the selection of the prefetch area to ensure the unprivleged user can read files from there. Move the selection logic to its own function prefetcharea_fs_list() which returns a unique list of candidate filesystems, or with rc=1. While at it, remove /var/tmp from the potential list of candidates because it's a symbolic link to /tmp since 2014. Change install_files() to loop over the candidates and check if it can read a test file, otherwise clean up and skip this filesystem. Problem found by benno@ whose upgrade failed due to /usr/obj being owned by build:wobj and permissions that prevented the unprivileged user to read the prefetched set files from there. discussed with and OK benno@ halex@ tb@