[arch-projects] [devtools] [PATCH] Do not assume the makechrootpkg user's groupname is the same as the username
Eli Schwartz
eschwartz at archlinux.org
Wed May 16 15:00:31 UTC 2018
chown support "$user:$group" but also "$user:" which infers $group
rather than leaving it as root. This looks up the group name in cases
where the default group is e.g. "users" and users do not get their own
unique groups.
Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
This is even more common than I thought, I've found a person who's
affected! :p
cf. https://lists.archlinux.org/pipermail/arch-projects/2018-March/004868.html
makechrootpkg.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/makechrootpkg.in b/makechrootpkg.in
index f709955..37e97e7 100644
--- a/makechrootpkg.in
+++ b/makechrootpkg.in
@@ -245,7 +245,7 @@ download_sources() {
local builddir
builddir="$(mktemp -d)"
- chown "$makepkg_user:$makepkg_user" "$builddir"
+ chown "$makepkg_user:" "$builddir"
# Ensure sources are downloaded
sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
--
2.17.0
More information about the arch-projects
mailing list