Yes, must be the anal glands. I have one girl who has to have her's expressed every now and then. We have the vet do it now, but I recently bought a book on grooming which contains instructions on how to empty them yourself. I recommend muzzling your dog when you're expressing the glands, and have someone holding him/her in place. It's pretty painful for the dog, and he/she may just bite because of that. Also if your dog rubs his/her butt after going to the bathroom or even not after going to the bathroom, he is trying to empty them. That's a sign that they need to be expressed.