Well, I guess we can pretty easily tell who in this thread owns dogs and who doesn't because those of us who own dogs know that, in general, a dog barking and running towards someone/something is not in attack mode. (And honestly, I think some folks are just young 20-something guys itching to be able to use the guns they carry.)
I think it's important that we differentiate between an "aggressive dog" and an "attacking dog." One is not synonymous with the other, and by the same token, shootingoneis not equal to shooting the other. (Consider: If I holler and shout and curse yyou there's no doubt I'm acting aggressive; but that aggresiveness isn't the same thign as actually attacking you.) Likewise, a barking dog, or even a barking dog approaching you is not necessarily an attack. In fact, dogs rarely attack. They attack when they're frightened, diseased (think: rabid, distemper), or cornered.
Dogs bark, they run: they're naturally curious and generally bark when they see something/someone new or out of place. Dogs have a lot of body language and that body language says a whole lot more than any barking ever will. Ears up, tail up=good mood. Ears flattened back, snarling/lips curled, hackles up=bad mood/angry dog. Dogs are also territorial. They naturally bark and want to "check out" anything in their territory. That's not the same as saying they're in attack mode simply because they're barking and approaching. If you're going to shot a dog, you'd best sure of a couple of things: the dog really is attacking, not just "being aggressive." The "I was in fear for my life because he barked and approached me" defense isn't going to cut it with many prosecutors nor dog owners. (It's no different than Uncle Jimbo and Ned saying "Look out! that bunny's coming right for us!") In addition to being sure you're actually being attacked you'd also best be sure you're not in the dog's yard and/or that he's out of his. (And no, shooting a dog who's in the street and barking at you doesn't count. Again: think "attack" vs "aggression/barking. Finally, consider the emotional baggage that comes with shooting a dog. Think about haivng to explain to your kid that some guy shot your dog because he was scared and thought Fluffy was going to bite him.
I'm not sayig dogs don't attack, and I'm not saying don't shoot if you/your loved onesfear you truly are in danger. If you/they are: shoot. Just be damened sure of what you're doing first. (And woe betide to anyone who shoots a dog on its own property.)