Black holes and the second law