Commit 39aad4fe authored by Jason Chu's avatar Jason Chu
Browse files

Escape the uniondir directory reference when creating $uniondir/etc/sudoers...

Escape the uniondir directory reference when creating $uniondir/etc/sudoers and set it to the proper permissions (440)
parent 411c07f2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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