"restraint or custody of such person as is by law entitled thereto." . . . .