mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-20 22:55:40 +00:00
a63489fd71
mock_build_owner ran mock's loader as root. mock itself loads its configuration as the user that sudo names, so with no chrootuid it builds as SUDO_UID. The helper reported uid 0, and prepare_mock_resultdirs then left root-owned logs in place. As root, the loader now builds the uid manager with mock's own setup_uid_manager() and loads the configuration through run_in_subprocess_without_privileges(), as mock main() does. prepare_mock_resultdirs gives mode 0755 to the parent directories that it creates, because make_path applies the umask. Directories that already exist keep their mode. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>