Back when I was a kid, there used to live an old dog around here, near where I live, whose owner(s?) was a drunken, indifferent moron who hardly fed the dog, not to mention let him come inside the house, let it rain or shine. The dog barked at everyone who walked past the house. Had he not been in a leash, he would've attacked. If someone went close, the dog would bite. But when the owner came close, the dog whined and tried to escape with his tail in between his back legs.
The poor dog... haven't heard of him for about ten years or so, now. But the description fits, doesn't it?