Iranian President Ahmadinejad barred from prison