Volume 3, Book 39, Number 515:
Narrated Abu Huraira:
Allah’s Apostle said, “Whoever keeps a dog, one Qirat of the reward of his good deeds is deducted
daily, unless the dog is used for guarding a farm or cattle.” Abu Huraira (in another narration) said
from the Prophet, “unless it is used for guarding sheep or farms, or for hunting.” Narrated Abu
Hazim from Abu Huraira: The Prophet said, “A dog for guarding cattle or for hunting.”