Douglas Muir has a pretty good breakdown of exactly what makes a regime vulnerable to collapse – and more importantly, factors that make collapse unlikely. His verdict regarding Iran? The regime holds steady unless the guys with the guns change sides:
While there are some reports of unease among the security forces, it appears the police and the military are holding steady.
Until and unless this changes, Ahmadinejad looks quite secure — green paint and massive street protests notwithstanding.