"The Messenger of Allah said: 'whoever keeps a dog, two Qirats will be detracted from his reward each day, except a trained hunting dog, or a dog for herding livestock."
Sunan an-Nasa'i Book 42, Hadith 22