diff options
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r-- | makechrootpkg.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in index b594de2..09c047e 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -176,9 +176,10 @@ prepare_chroot() { # We can't use useradd without chrooting, otherwise it invokes PAM modules # which we might not be able to load (i.e. when building i686 packages on # an x86_64 host). - sed -e '/^builduser:/d' -i "$copydir"/etc/{passwd,group} + sed -e '/^builduser:/d' -i "$copydir"/etc/{passwd,shadow,group} printf >>"$copydir/etc/group" 'builduser:x:%d:\n' "$builduser_gid" printf >>"$copydir/etc/passwd" 'builduser:x:%d:%d:builduser:/build:/bin/bash\n' "$builduser_uid" "$builduser_gid" + printf >>"$copydir/etc/shadow" 'builduser:!!:%d::::::\n' "$(( $(date -u +%s) / 86400 ))" $install -d "$copydir"/{build,build/.gnupg,startdir,{pkg,srcpkg,src,log}dest} @@ -298,7 +299,7 @@ download_sources() { local builddir builddir="$(mktemp -d)" - chmod 1777 "$builddir" + chown "$makepkg_user:" "$builddir" # Ensure sources are downloaded sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \ |