summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-12-09 12:51:47 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-12-09 12:51:47 +0100
commit397f4cb04b1d3aa886775f94e22144080b0b8d3d (patch)
tree41eee826ca159737cce78a23ec8626dd167ed0f9
parentf98eaebd1ba12ae1d0227b8d4fe951feec5119e3 (diff)
downloaddevtools-397f4cb04b1d3aa886775f94e22144080b0b8d3d.tar.xz
makechrootpkg: The user nobody is only needed to run pacman
-rwxr-xr-xmakechrootpkg7
1 files changed, 2 insertions, 5 deletions
diff --git a/makechrootpkg b/makechrootpkg
index 695b44b..e3e2baf 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -196,11 +196,8 @@ chown -R nobody "$copydir/build"
chown -R nobody "$copydir/srcdest"
chown -R nobody "$copydir/pkgdest"
-if ! grep "^nobody" "$copydir/etc/sudoers" >/dev/null 2>&1; then
- touch "$copydir/etc/sudoers"
- echo 'nobody ALL=(ALL) NOPASSWD: ALL' >> "$copydir/etc/sudoers"
- chmod 440 "$copydir/etc/sudoers"
-fi
+echo 'nobody ALL = NOPASSWD: /usr/bin/pacman' > "$copydir/etc/sudoers.d/nobody-pacman"
+chmod 440 "$copydir/etc/sudoers.d/nobody-pacman"
#This is a little gross, but this way the script is recreated every time in the
#working copy