What is the jurisprudential distinction between a dog for house protection and a dog for guarding crops/livestock?

Chapter on Selling the Musarrah (Animal with milk retained in udder)

Al-Mughni

Book of Sales

Book 12 · Issue 3 · Bab 5

Open in Qurani

Primary text

The analogy to the permitted categories fails for house-guarding dogs because a thief can trick a dog guarding a house by feeding it something to remove it, allowing the theft to occur. This vulnerability does not apply to a wolf, which is mentioned as a point of comparison for efficacy. Furthermore, keeping a dog inside houses causes harm to passersby, unlike keeping them in the open desert.