They gave him a book.
He was given a book.
In the first sentence above, "They" is the subject, "him" is the indirect object, and "a book" is the direct object.
In the second sentence, "He" is the subject.
For some reason I hesitate to call "a book" the direct object in the second sentence.
Does my hesitation have some justification that expertise in syntax can identify? If so, what would one call it instead of a direct object?