diff options
author | Jason Chu <jchu@xentac.net> | 2007-11-04 15:02:55 -0800 |
---|---|---|
committer | Jason Chu <jchu@xentac.net> | 2007-11-04 15:02:55 -0800 |
commit | 39aad4fe5929bda91564277194cd4909c95dd46d (patch) | |
tree | d292b071f282749c5fe5ce38ddb9d4b5e1ac51ee /makechrootpkg | |
parent | 411c07f2fb4ee504815deeb566b480b48532ac82 (diff) | |
download | devtools-39aad4fe5929bda91564277194cd4909c95dd46d.tar.xz |
Escape the uniondir directory reference when creating $uniondir/etc/sudoers and set it to the proper permissions (440)
Diffstat (limited to 'makechrootpkg')
-rwxr-xr-x | makechrootpkg | 3 |
1 files changed, 2 insertions, 1 deletions
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 |