Anal glands are small sacs located on either side of a dog's anus that produce a smelly fluid. When these glands become impacted or infected, they can cause leakage and discomfort for your pet.