I don't know about RWH PDFs from O'Reilly, but all the content in that book was made available on the author's website.
They did sort of an open editing dealy.
They did sort of an open editing dealy.
Edit: Seems that they are linking only to the site and not a pdf for RWH so it could well be legal :)