From 39aad4fe5929bda91564277194cd4909c95dd46d Mon Sep 17 00:00:00 2001 From: Jason Chu Date: Sun, 4 Nov 2007 15:02:55 -0800 Subject: Escape the uniondir directory reference when creating $uniondir/etc/sudoers and set it to the proper permissions (440) --- makechrootpkg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'makechrootpkg') diff --git a/makechrootpkg b/makechrootpkg index 09a5e7e..8cd8af7 100755 --- a/makechrootpkg +++ b/makechrootpkg @@ -103,7 +103,8 @@ fi if ! grep "^nobody" "$uniondir/etc/sudoers" >/dev/null 2>&1; then echo "allowing 'nobody' sudo rights in the chroot" - echo "nobody ALL=(ALL) NOPASSWD: ALL" >> $uniondir/etc/sudoers + echo "nobody ALL=(ALL) NOPASSWD: ALL" >> "$uniondir/etc/sudoers" + chmod 440 "$uniondir/etc/sudoers" fi #This is a little gross, but this way the script is recreated every time in the -- cgit v1.2.3-24-g4f1b