Yup, they are none too pleasant at all.
Fun fact about anal glands: it's thought that canids, at one time, could spray the contents of the sacs much like a skunk does. Eventually they lost that ability (thank god) and it just became a marking of territory type of thing, which is why they're expressed during BM. In domestic dogs they're worthless except for smelling up the joint (though technically a good thing for identification of dogs with one another) and getting ruptured.