The Messenger of Allah ﷺ said, "Whoever keeps a dog, a qirat is deducted from his deeds each day, except for a dog kept for farming or livestock."Ibn Sirin and Abu Salih reported from Abu Hurairah, from the Prophet ﷺ, "Except for a dog kept for sheep, farming, or hunting."Abu Hazim reported from Abu Hurairah, from the Prophet ﷺ, "A dog for hunting or livestock."
قال رسول الله ﷺ: من أمسك كلبا فإنه ينقص كل يوم من عمله قيراط إلا كلب حرث أو ماشية. قال ابن سيرين وأبو صالح، عن أبي هريرة، عن النبي ﷺ: إلا كلب غنم، أو حرث، أو صيد وقال أبو حازم، عن أبي هريرة، عن النبي ﷺ: كلب صيد أو ماشية.
Bukhari related it in "Cultivation and Sharecropping" (2322), and Muslim in "Sharecropping" (1575:59), both from the hadith of Hisham Dastawai, who said, "Yahya bin Abu Kathir narrated to us, from Abu Salama, from Abu Hurairah," as mentioned. The wording is Bukhari's. The corroborating narrations that Bukhari mentioned were not mentioned by Muslim, though he mentioned other corroborations instead.Among them is what he related from Abu Tahir and Harmala, who both said, "Ibn Wahb informed us, Yunus informed me, from Ibn Shihab, from Saeed bin Musayab, from Abu Hurairah, that the Messenger of Allah ﷺ said, 'Whoever keeps a dog that is not a hunting dog, a herding dog, or a farm dog, two qirats will be deducted from his reward every day.'"Muslim said, "The narration of Abu Tahir does not contain the words, 'or a farm dog.'"