diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2025-10-12 04:32:29 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2025-10-12 20:11:46 +0000 |
commit | 0cc81b375ea43c7e853b109d00c72c8c3b3df993 (patch) | |
tree | 77ecba3539b33742132f29acf0068a6c9e69b4bf /sys/security/lomac/(public-mirror) | |
parent | 2347ca21d657121670e6e7246c6ac32efc996cac (diff) |
When creating VM images from pkgbase, the METALOG may not be in order;
in particular, files may be listed before the directories which contain
them. This causes makefs to create directories with 000 permissions.
Interestingly, such VM images boot just fine, since root ignores those
permissions; the first sign of trouble was sshd refusing logins with an
error message which said absolutely nothing about /etc/ having
incorrect permissions or being unable to read files inside it.
Immediately prior to running makefs, sort the METALOG file. While
we're here, uniquify as well; this does not guarantee that we do not
have duplicate paths, but if there are duplicate paths with different
settings something else has gone wrong and we don't really have any
good way of solving the problem anyway.
Reviewed by: ivy
Hint from: imp
MFC after: 3 days
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D53046
Diffstat (limited to 'sys/security/lomac/(public-mirror)')
0 files changed, 0 insertions, 0 deletions