Training or holding a dog so as to safeguard a certain thing means he will be helped by someone in attaining his goal. In this case the dog does not symbolise an enemy.